例1:求存款到期利息。
【问题描述】
输入存款金额money、存期year和年利率rate,根据下列公式计算存款到期时的利息interest(税前):
interest=money×(1+rate)^year-money
输出时保留两位小数。
【样例输入】(下划线部分表示输入)
Enter money,year and rate:1000 3 0.025
【样例输出】
interest=76.89
【样例说明】提示字符均是英文字符。输入提示符的冒号后面无空格,输出的“=”号两边无空格。
#include <stdio.h>
#include <math.h>//pow()函数在<math.h>库中
int main()
{
double m,y,r,i;
printf("Enter money,year and rate:") ;
<