提交时间:2019-10-18 17:47:36

运行 ID: 1673

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