C-study/02-1/3/3.c
2021-09-29 15:15:39 +08:00

13 lines
268 B
C

#include<stdio.h>
#include<math.h>
int main()
{
float money,year,rate,interest;
printf("Enter money,year and rate: \n");
scanf("%f %f %f",&money,&year,&rate);
interest = money * pow((1 + rate), year) - money;
printf("interest=%.2f",interest);
return 0;
}