提交时间:2019-10-11 21:20:17
运行 ID: 1488
#include<iostream> int main(){ int qx; float bj,sr; scanf("%d %f",&qx,&bj); if(qx==1){ sr=bj*0.0255+bj; } if(qx==2){ sr=(bj*0.0243)+((bj+bj*0.0243)*0.0243)+bj; } if(qx==3){ sr=(bj*0.0270)+((bj+bj*0.0270)*0.0270)+((bj+(bj+bj*0.0270)*0.0270)*0.0270)+bj; } if(qx==4){ sr=(bj*0.0288)+((bj+bj*0.0288)*0.0288)+((bj+(bj+bj*0.0288)*0.0288)*0.0288)+((bj+(bj+(bj+bj*0.0288)*0.0288)*0.0288)*0.0288)+bj; } if(qx==5){ sr=(bj*0.0300)+((bj+bj*0.0300)*0.0300)+((bj+(bj+bj*0.0300)*0.0300)*0.0300)+((bj+(bj+(bj+bj*0.0300)*0.0300)*0.0300)*0.0300)+((bj+(bj+(bj+(bj+bj*0.0300)*0.0300)*0.0300)*0.0300)); } printf("合计为%f",sr); return 0; }