Está en la página 1de 1

#include <stdio.

h>
#include <conio2.h>
#include <math.h>
//variables
double cantidad;
double interes;
int tiempo;
double cuota;
double interesMensual;
// introduccin datos
int main()
{
printf("Prestamo en euros\n");
scanf("%lf", &cantidad);
printf("Tipo de interes %\n");
scanf("%lf", &interes);
printf("Aos de amortizacion\n");
scanf("%d", & tiempo);
//calcular
interesMensual = interes/(12*100);
cuota = (cantidad*interesMensual) / (1.0 - 1/pow(1+interesMensual,tiempo*12));
//resultado
printf("Cuota mensual: %.21f ", cuota);
getch();
}

También podría gustarte