提交时间:2019-10-18 20:40:15
运行 ID: 1686
#include<iostream> int main(){ float sum,one,two,three,four,five; int n; scanf("%d %f",&n,&sum); one=sum*1.0225; two=sum*1.0243*1.0243; three=sum*1.027*1.027*1.027; four=sum*1.0288*1.0288*1.0288*1.0288; five=sum*1.03*1.03*1.03*1.03*1.03; switch(n){ case 1:printf("合计为%f",one); break; case 2:printf("合计为%f",two); break; case 3:printf("合计为%f",three); break; case 4:printf("合计为%f",four); break; case 5:printf("合计为%f",five); } return 0; }