提交时间:2019-10-08 19:15:14
运行 ID: 1401
#include<iostream> int main(){ float a=1,b=2,d=3,e=4,f=5,p; char q; scanf("%f,%f",&p,&q); switch(q) { case 1: p=p+p*q*0.00225;break; case 2: p=p+2*p*q*0.00243;break; case 3: p=p+3*p*q*0.0027; break; case 4: p=p+4*p*q*0.00288;break; case 5: p=p+5*p*q*0.003;break; } printf("合计为%f",p); return 0; }