#include<stdio.h> int main() { double a; scanf("%lf",&a); if(a<=100000) printf("%.2f\n",a*0.1); else if(a>100000&&a<=200000) printf("%.2f\n",10000+(a-100000)*0.075); else if(a>200000&&a<=400000) printf("%.2f\n",17500+(a-200000)*0.05); else if(a>400000&&a<=600000) printf("%.2f\n",27500+(a-400000)*0.03); else if(a>600000&&a<=1000000) printf("%.2f\n",33500+(a-600000)*0.015); else printf("%.2f\n",39500+(a-1000000)*0.1); return 0; } 请问大佬 这个为啥错了呢
倾世冷悠 2020-02-15 18:52:01 |
39500+(a-1000000)*0.1这错了,是9500+(a-1000000)*0.01,少了个0
倾世冷悠 2020-02-15 18:52:27 |
不好意思,今天才看到
倾世冷悠 2020-02-15 18:53:07 |
我上面少打了个3,是这个39500+(a-1000000)*0.1这错了,是39500+(a-1000000)*0.01,少了个0
倾世冷悠 2020-02-15 18:53:26 |
我私聊你了,你看看
光仔 2020-02-19 17:03:15 |
喔喔谢谢谢谢谢谢
倾世冷悠 2020-02-21 20:59:46 |
不用谢