解题思路:
注意事项:
参考代码:
#include<stdio.h>
int main()
{
int a,b;
scanf("%d",&a);
switch(a/100000)
{
case 0:b=a*0.1;printf("%d",b);break;
case 1:b=10000+(a-100000)*0.075;printf("%d",b);break;
case 2:
case 3:b=17500+(a-200000)*0.05;printf("%d",b);break;
case 4:
case 5:b=27500+(a-400000)*0.03;printf("%d",b);break;
case 6:
case 7:
case 8:
case 9:b=33500+(a-600000)*0.015;printf("%d",b);break;
default:b=93500+(a-1000000)*0.01;printf("%d",b);break;
}
return 0;
}
0.0分
1 人评分
C语言程序设计教程(第三版)课后习题6.4 (C语言代码)浏览:538 |
C语言训练-求函数值 (C语言代码)浏览:937 |
【绝对值排序】 (C语言代码)浏览:717 |
简单的a+b (C语言代码)浏览:530 |
A+B for Input-Output Practice (IV) (C语言代码)浏览:489 |
DNA (C语言代码)浏览:749 |
Tom数 (C语言代码)浏览:527 |
1202题解浏览:626 |
众数问题 (C语言代码)浏览:630 |
2003年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:1325 |