c语言编程练习题:7-96 计算存款利息
作者:yunjinqi   类别:    日期:2023-05-31 10:32:40    阅读:135 次   消耗积分:0 分    

image.png

#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;
}


版权所有,转载本站文章请注明出处:云子量化, http://www.woniunote.com/article/221
上一篇:c语言编程练习题:7-95 计算火车运行时间
下一篇:c语言编程练习题:7-97 计算个人所得税