解题思路:
注意事项:
参考代码:
#include <stdio.h> int main() { int profit; float bonus; scanf("%d", &profit); if(profit <= 100000) { bonus = profit*0.1; } else if(profit > 100000 && profit <= 200000){ bonus = ((profit - 100000) * 0.075 + 10000*0.1 ); } else if(profit > 200000 && profit <= 400000){ bonus = (profit - 200000) * 0.05 + 20000 * 0.1; } else if(profit > 400000 && profit <= 600000){ bonus = (profit - 400000) * 0.03 + 40000 * 0.1; }else if(profit > 600000 && profit <= 1000000){ bonus = (profit - 600000) * 0.015 + 600000 * 0.1; }else { bonus = (profit - 1000000) * 0.01 + 1000000 * 0.1; } printf("%.0f\n", bonus); return 0; }
0.0分
0 人评分
C语言训练-计算1~N之间所有奇数之和 (C语言代码)浏览:623 |
1024题解浏览:779 |
出圈】指针malloc版浏览:351 |
2006年春浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:334 |
陈教主的三角形 (C语言代码)浏览:1081 |
良心推荐——>题解1049:C语言程序设计教程(第三版)课后习题11.1 (C语言描述——简单明了,时间复杂度低)浏览:1255 |
母牛的故事 (C语言代码)浏览:530 |
【偶数求和】 (C语言代码)浏览:422 |
整数分类问题 为什么输出总是数字8啊浏览:442 |
C语言程序设计教程(第三版)课后习题7.3 (C语言代码)浏览:534 |