#include <stdio.h> #include <math.h> int main(){ double money,year,rate,interest; if (scanf("%lf %lf %lf",&money,&year,&rate)!=EOF){ // printf("%f %f %f",money,year,rate); interest = money*pow((1+rate),year)-money; printf("interest = %.2f",interest); }else{ printf("input wrong"); } return 0; }