#include
void main()
{int money,year;
float rate,interest;
printf("input money:\n");
scanf("%d",&money);
printf("input rate:\n");
scanf("%f",&rate);
printf("input year:\n");
scanf("%d",&year);
interest=money*(1+rate)*year-money;
printf("the interest is:%.2f\n",interest);
}
有问题再找我