提交时间:2019-10-20 19:49:15
运行 ID: 1781
// 3C #include<iostream> int main(){ int a,year=1; double b; double lv; scanf("%d,%lf",&a,&b); switch(a){ case 1:lv=2.25*0.01;break; case 2:lv=2.42*0.01;break; case 3:lv=2.7*0.01;break; case 4:lv=2.88*0.01;break; case 5:lv=3*0.01;break; default:lv=1; } while(year<=a){ b=b*(1+lv); year++; } printf("合计为%.6lf",b); return 0; }