提交时间:2019-10-18 21:17:21

运行 ID: 1707

#include<iostream> int main(){ float sum; int n; scanf("%d %f",&n,&sum); switch(n){ case 1:sum=sum*1.0225;break; case 2:sum=sum*1.0243*1.0243;break; case 3:sum=sum*1.027*1.027*1.027;break; case 4:sum=sum*1.0288*1.0288*1.0288*1.0288;break; case 5:sum=sum*1.03*1.03*1.03*1.03*1.03; } printf("合计为%f",sum); return 0; }