问答详情
源自:-

童鞋们求解答,这段程序我不知道是哪里出错了,算出的结果不对

#include<stdio.h>

#include<stdlib.h>

#include<math.h>

int main(void)

{

int money,year;

double rate,sum;

printf("Enter money:");

scanf("%d",&money);

printf("Enter year:");

scanf("%d",&year);

printf("Enter rate:");

scanf("%If",&rate);

sum=money*pow(1+rate,year);

printf("sum=%.2f\n",sum);

system("pause");

return 0;




}


提问者:JTRV 2015-10-10 10:15

个回答

  • nb_man
    2015-10-10 15:17:20

    scanf("%If",&rate);     ??????    %If ??