大学生C语言编程作业题,请高手帮忙,急!

程序填空,不要改变与输入输出有关的语句。
输入存款金额 money、存期 year 和年利率 rate,根据下列公式计算存款到期时的利息 interest(税前),输出时保留2位小数。
interest = money(1+rate)^year - money
输入输出示例:括号内为说明
输入
1000 (money = 1000)
3 (year = 3)
0.025 (rate = 0.025)
输出
interest = 76.89

#include <stdio.h>
#include <math.h>
#include "genlib.h"
#include "simpio.h"
int main(void)
{
int money, year;
double interest, rate;

/*---------*/
printf("interest = %.2f\n", interest);
}

第1个回答  2014-10-20
#include <stdio.h>
#include <math.h>
int main(void)
{
int money, year;
double interest, rate;
/**-----------*/
scanf("%d", &money );
scanf("%d", &year );
scanf("%lf", &rate );
interest=money*pow((1+rate), year )-money ;
/*---------*/
printf("interest = %.2f\n", interest); 
return 0;
}

追问

我还有几道题,麻烦您再帮我做一下,非常感谢,有两道我已经又一次提问了。

追答

你直接向我发求助吧,这样我方便看到你的问题,或者你提问后将链接发我

追问

我的QQ号刚才给您发私信了,麻烦加我一下,帮我看看其他的题目,十分感谢!!!

追答

现在上不了QQ啊,环境被限制死了

本回答被网友采纳
相似回答