程序填空,不要改变与输入输出有关的语句。
输入存款金额 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);
}
我还有几道题,麻烦您再帮我做一下,非常感谢,有两道我已经又一次提问了。
追答你直接向我发求助吧,这样我方便看到你的问题,或者你提问后将链接发我
追问我的QQ号刚才给您发私信了,麻烦加我一下,帮我看看其他的题目,十分感谢!!!
追答现在上不了QQ啊,环境被限制死了
本回答被网友采纳