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