#include <stdio.h>
#include <math.h>
int main()
{
int loan;
double month,rate,year,money;
printf("Enter loan:");
scanf("%d",&loan);
printf("Enter rate:");
scanf("%lf",&rate);
for(year=5;year<=30;year++)
{
month=year*12;
money=loan*rate*pow(1+rate,month)/(pow(1+rate,month)-1);
printf(" money(%d,%.0lf)=%.0lf\n",loan,year,money);
}
return 0;
}
11-01
891
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)