解题思路:
注意事项:
参考代码:
#include<stdio.h>
int main()
{
int I;
int sum=0;
scanf("%d",&I);
switch(I/100000)
{
default :
case 10 : sum+=(I-1000000)*0.01;
case 9 :
case 8 :
case 7 :
case 6 : sum+=(I>1000000?400000:I-600000)*0.015;
case 5 :
case 4 : sum+=(I>600000?200000:I-400000)*0.03;
case 3 :
case 2 : sum+=(I>400000?200000:I-200000)*0.05;
case 1 : sum+=(I>200000?100000:I-100000)*0.075;
case 0 : sum+=(I>100000?100000:I)*0.1;
}
printf("%d",sum);
return 0;
}
0.0分
0 人评分