Anda di halaman 1dari 5

Hecho Por Josue Abel Alvizuris Ucelo de 5to.

Bachillerato en Computacion
#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
clrscr();
float M,c,i,m,n;
int x,op;
printf("Menu Principal Interes Compuesto\n\n");
printf("1. Monto\n");
printf("2. Capital Inicial\n");
printf("3. Tanto Por Ciento\n");
printf("4. No de Aos\n");
printf("5. Salir\n");
printf("Ingrese su Opcion:"); scanf("%d", &op);
if (op==1)
{
printf("Ingrese Capital Incial=>"); scanf("%f",&c);
printf("Ingrese El Tanto Por Ciento=>"); scanf("%f",&i);
printf("Ingrese El Numero de Aos=>"); scanf("%f",&n);
printf("Ingrese el Numero de Capitalizaciones al ao=>"); scanf("%f",&m);
printf("\nC=>%0.2f\n",c);
printf("i=>%0.2f\%\n",i*100);
printf("n=>%0.2f\n",n);
printf("m=>%0.2f\n",m);
M=c*pow(1+i/m,n*m);
printf("\nMonto es=>%0.2f\n",M);
printf("\n%10s%20s\n\n","n","M");
for(x=1;x<=n*m;x++)
{
M=c*pow(1+i/m,x);
printf("%10.2f%20.2f\n",1/m*x,M);
}
printf("\nInteres=>%0.2f\n",M-c);
}
if (op==2)
{
printf("Ingrese Monto=>"); scanf("%f",&M);
printf("Ingrese El Tanto Por Ciento=>"); scanf("%f",&i);
printf("Ingrese El Numero de Aos=>"); scanf("%f",&n);
printf("Ingrese el Numero de Capitalizaciones al ao=>"); scanf("%f",&m);
printf("\nM=>%0.2f\n",M);
printf("i=>%0.2f\%\n",i*100);
printf("n=>%0.2f\n",n);
printf("m=>%0.2f\n",m);
c=M/pow(1+i/m,n*m);
printf("\nCapital es=>%0.2f\n",c);
printf("\n%10s%20s\n\n","n","M");
for(x=1;x<=n*m;x++)
{
M=c*pow(1+i/m,x);
printf("%10.2f%20.2f\n",1/m*x,M);
}
printf("\nInteres=>%0.2f\n",M-c);
}
if (op==3)
{
printf("Ingrese El Monto=>"); scanf("%f",&M);
printf("Ingrese El Capital Incial=>"); scanf("%f",&c);
printf("Ingrese El Numero de Aos=>"); scanf("%f",&n);
printf("Ingrese El Numero de Capitalizaciones al ao=>"); scanf("%f",&m);
printf("\nM=>%0.2f\n",M);
printf("c=>%0.2f\%\n",c);
printf("n=>%0.2f\n",n);
printf("m=>%0.2f\n",m);
i=m*(pow(M/c,1/(n*m)))-m;
printf("\nTanto Por Ciento es=>%0.2f\%\n",i*100);
printf("\n%10s%20s\n\n","n","M");

for(x=1;x<=n*m;x++)
{
M=c*pow(1+i/m,x);
printf("%10.2f%20.2f\n",1/m*x,M);
}
printf("\nInteres=>%0.2f\n",M-c);
}
if (op==4)
{
printf("Ingrese El Monto=>"); scanf("%f",&M);
printf("Ingrese El Capital Incial=>"); scanf("%f",&c);
printf("Ingrese El Tanto Por Ciento=>"); scanf("%f",&i);
printf("Ingrese El Numero de Capitalizaciones al ao=>"); scanf("%f",&m);
printf("\nM=>%0.2f\n",M);
printf("c=>%0.2f\n",c);
printf("i=>%0.2f\%\n",i*100);
printf("m=>%0.2f\n",m);
n=(log(M/c))/(m*(log(1+i/m)));
printf("\numero de Aos=>%0.2f\n",n);
printf("\n%10s%20s\n\n","n","M");
for(x=1;x<=(n*m);x++)
{
M=c*pow(1+i/m,x);
printf("%10.2f%20.2f\n",1/m*x,M);
}
printf("\nInteres=>%0.2f\n",M-c);
}
if(op==5)
printf("Eligio Salir Vuelva Pronto\n");
if(op<1||op>5)
printf("Eligio Una Opcion Incorrecta\n");
printf("\nPresione Una Tecla Para Salir\n");
getch();
}
Vista al Correrlo
Menu Principal Interes Compuesto
1. Monto
2. Capital Inicial
3. Tanto Por Ciento
4. No de Aos
5. Salir
Ingrese su Opcion:1
Ingrese Capital Incial=>1000
Ingrese El Tanto Por Ciento=>.2
Ingrese El Numero de Aos=>2
Ingrese el Numero de Capitalizaciones al ao=>4
C=>1000.00
i=>20.00%
n=>2.00
m=>4.00
Monto es=>1477.46
n

0.25
0.50
0.75
1.00
1.25
1.50
1.75
2.00

1050.00
1102.50
1157.62
1215.51
1276.28
1340.10
1407.10
1477.46

Interes=>477.46
Presione Una Tecla Para Salir

Hecho Por Josue Abel Alvizuris Ucelo de 5to. Bachillerato en Computacion


#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
int x, op;
float I,su,c,ut,t,r;
clrscr();
printf("Menu Principal Interes Simple\n\n");
printf("1. Interes\n");
printf("2. Capital\n");
printf("3. Tanto Por Ciento\n");
printf("4. Tiempo\n");
printf("5. Salir\n");
printf("Ingrese su Opcion:"); scanf("%d", &op);
if (op==1)
{
printf("Ingrese Capital=>"); scanf("%f",&c);
printf("Ingrese El Tanto Por Ciento=>"); scanf("%f",&r);
printf("Ingrese La Unidad de Tiempo=>"); scanf("%f",&ut);
printf("Ingrese El Tiempo=>"); scanf("%f",&t);
printf("\nC=>%0.2f\n",c);
printf("r=>%0.2f\%\n",r*100);
printf("ut=>%0.2f\n",ut);
if(ut==1)
printf("t=>%0.2f aos\n",t);
if(ut==12)
printf("t=>%0.2f meses\n",t);
if(ut==360 || ut==365)
printf("t=>%0.2 dias\n",t);
I=c*t*r/ut;
printf("\nInteres es=>%0.2f\n",I);
printf("\n%10s%20s\n\n","t","I");
for(x=1;x<=t;x++)
{
I=c*1*r/ut;
printf("%10.2f%20.2f\n",(float)x,I);
su=su+I;
}
printf("\nInteres Total=>%0.2f",su);
}
if (op==2)
{
printf("Ingrese Interes=>"); scanf("%f",&I);
printf("Ingrese El Tanto Por Ciento=>"); scanf("%f",&r);
printf("Ingrese La Unidad de Tiempo=>"); scanf("%f",&ut);
printf("Ingrese El Tiempo=>"); scanf("%f",&t);
printf("\nI=>%0.2f\n",I);
printf("r=>%0.2f\%\n",r*100);
printf("ut=>%0.2f\n",ut);
if(ut==1)
printf("t=>%0.2f aos\n",t);
if(ut==12)
printf("t=>%0.2f meses\n",t);
if(ut==360 || ut==365)
printf("t=>%0.2 dias\n",t);
c=(I*ut)/(t*r);
printf("\nCapital es=>%0.2f\n",c);
printf("\n%10s%20s\n\n","t","I");
for(x=1;x<=t;x++)
{
I=c*1*r/ut;
printf("%10.2f%20.2f\n",(float)x,I);
su=su+I;
}
printf("\nInteres Total=>%0.2f",su);
}
if (op==3)

{
printf("Ingrese El Interes=>"); scanf("%f",&I);
printf("Ingrese El Capital=>"); scanf("%f",&c);
printf("Ingrese La Unidad de Tiempo=>"); scanf("%f",&ut);
printf("Ingrese El Tiempo=>"); scanf("%f",&t);
printf("\nI=>%0.2f\n",I);
printf("c=>%0.2f\n",c);
printf("ut=>%0.2f\n",ut);
if(ut==1)
printf("t=>%0.2f aos\n",t);
if(ut==12)
printf("t=>%0.2f meses\n",t);
if(ut==360 || ut==365)
printf("t=>%0.2 dias\n",t);
r=(I*ut)/(c*t);
printf("\nTanto Por Ciento es=>%0.2f\%\n",r*100);
printf("\n%10s%20s\n\n","t","I");
for(x=1;x<=t;x++)
{
I=c*1*r/ut;
printf("%10.2f%20.2f\n",(float)x,I);
su=su+I;
}
printf("\nInteres Total=>%0.2f",su);
}
if (op==4)
{
printf("Ingrese El Interes=>"); scanf("%f",&I);
printf("Ingrese El Capital=>"); scanf("%f",&c);
printf("Ingrese La Unidad de Tiempo=>"); scanf("%f",&ut);
printf("Ingrese El Tanto Por Ciento=>"); scanf("%f",&r);
printf("\nI=>%0.2f\n",I);
printf("c=>%0.2f\n",c);
printf("ut=>%0.2f\n",ut);
printf(" r=>%0.2f\%\n",r*100);
t=(I*ut)/(c*r);
if(ut==1)
printf("Tiempo es=>%0.2f aos\n",t);
if(ut==12)
printf("Tiempo es=>%0.2f meses\n",t);
if(ut==360 || ut==365)
printf("Tiempo es=>%0.2 dias\n",t);
printf("\n%10s%20s\n\n","t","I");
for(x=1;x<=t;x++)
{
I=(c*1*r)/ut;
printf("%10.2f%20.2f\n",(float)x,I);
su=su+I;
}
printf("\nInteres Total=>%0.2f",su);
}
if(op==5)
printf("Eligio Salir Vuelva Pronto\n");
if(op<1 || op>5)
printf("Eligio Una Opcion Incorrecta\n\n");
printf("\nPress Any Key to Exit\n");
getch();
}

Vista al Correrlo
Menu Principal Interes Simple
1. Interes
2. Capital
3. Tanto Por Ciento
4. Tiempo
5. Salir
Ingrese su Opcion:1
Ingrese Capital=>1000
Ingrese El Tanto Por Ciento=>.2
Ingrese La Unidad de Tiempo=>12
Ingrese El Tiempo=>24
C=>1000.00
r=>20.00%
ut=>12.00
t=>24.00 meses
Interes es=>400.00
t
1.00
2.00
3.00
4.00
5.00
6.00
7.00
8.00
9.00
10.00
11.00
12.00
13.00
14.00
15.00
16.00
17.00
18.00
19.00
20.00
21.00
22.00
23.00
24.00

I
16.67
16.67
16.67
16.67
16.67
16.67
16.67
16.67
16.67
16.67
16.67
16.67
16.67
16.67
16.67
16.67
16.67
16.67
16.67
16.67
16.67
16.67
16.67
16.67

Interes Total=>400.00
Press Any Key to Exit

Anda mungkin juga menyukai