第八周练习--工资计算
2016-10-25 11:28
302 查看
问题及代码:
运行结果:
/* Copyright (c) 2016,烟台大学计算机与控制工程学院 All Rights Reserved. 文件名称:工资的计算 作 者:胡寅生 完成日期:2016年10月18日 版 本 号;v1.0 */ #include <stdio.h> #include <math.h> int main() { int profit,capital; int t; scanf("%d",&profit); t=(profit-1)/100000; switch(t) { case 0: capital=profit*0.1; break; case 1: capital=(profit-100000)*0.075+100000*0.1; break; case 2: case 3: capital=(profit-200000)+100000*0.1+100000*0.075; case 4: case 5: capital=(profit-400000)*0.03+100000*0.1+100000*0.075+200000*0.05; break; case 6: case 7: case 8: case 9: capital=(profit-1000000)*0.01+100000*0.1+100000*0.075+200000*0.05+200000*0.03+400000*0.015; } printf("%d\n",capital); return 0; }
运行结果:
相关文章推荐
- 第八周项目六计算周工资
- 第八周 上机练习 算工资的程序
- 第八周 项目二 周工资计算
- java练习--输出员工信息并计算员工的工资
- 第八周项目2-计算小贺的周工资
- 第八周项目2-计算小贺的周工资
- 我就给一个PHP逆波兰表达式的算法吧---工资计算专用
- 公布一下工资管理系统中核心部分工资计算的代码
- 第八周上机任务2-计算定期还款额度
- 第八周 项目二 工资问题
- 我就给一个PHP逆波兰表达式的算法吧---工资计算专用
- 第八周项目3-求工资问题(2013新)
- 7-2367 计算职工工资(20 分)
- 2011 年新劳动法 劳动合同法实务解析 工资计算 及劳动者权益保护
- 第八周-计算定期还款余额
- 我就给一个PHP逆波兰表达式的算法吧---工资计算专用
- 蓝桥杯基础练习 阶乘计算(简单模拟)
- 简单叙述动态公式的工资系统的计算方式
- Paradigms of Computer Programming,编程模式学习中递归调用的练习02-计算素数
- 9.28机试 使用面向对象思想,输出员工信息并计算员工的工资。