C工资管理系统源程序.doc

  1. 1、本文档共8页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
C工资管理系统源程序

#include stdafx.h #include iostream #include string #include list #include cassert using namespace std; /* 编号、姓名、部门、应付工资、保险、税金、实付工资。 其中实付工资由公式计算得到:实付工资=应付工资 - 保险- 税金 */ struct employee{ string m_num;//编号 string m_name;//姓名 string m_dep;//部门 double m_salary;//应付工资 double m_insurance;//保险 double m_tax;//税金 }; /* (1)录入:输入职工数据,其中“实付工资”通过计算得到; (2)删除:删除指定的职工信息(输入姓名,若找到则删除该信息) (3) 修改:允许对已经录入的数据重新进行编辑、修改; (4) 显示:显示全体职工数据; (5)查询: a. 输入职工姓名,显示该职工的全部数据; b. 输入某部门值,显示该部门职工的数据、工资总额、平均工资。 (6) 退出程序。 */ listemployee emps; int _tmain(int argc, _TCHAR* argv[]) { void print(const employee e); void input(); void del(); void mod(); void show_all(); void show_name(); void show_dep(); cout简易职工薪水管理程序 by 做他\n;// delete this line cout版权没有 请随意复制或修改任何代码\n;//delete this line cout请选择操作:1.录入 2.删除 3.修改 4.查询 5.显示所有员工 6.退出 :; int choose=0; cinchoose; assert(!cin.fail()); while (choose!=6) { if (choose==1) input(); if (choose==2) del(); if (choose==3) mod(); if (choose==4) { int choice=0; cout请选择操作 1.按姓名查询 2.按部门查询 3.退出:; cinchoice; if (choice==1) show_name(); if (choice==2) show_dep(); if (choice==3) { cout请选择操作:1.录入 2.删除 3.修改 4.查询 5.显示所有员工 6.退出 :; cinchoose; assert(!cin.fail()); continue; } } if (choose==5) show_all(); cout请选择操作:1.录入 2.删除 3.修改 4.查询 5.显示所有员工 6.退出 :; cinchoose; assert(!cin.fail()); } return 0; } void print(const employee e) { cout编号:e.m_numendl; cout姓名:e.m_nameendl; cout部门:e.m_dependl; cout保险:e.m_insuranceendl; cout税金:e.m_taxendl; cout应付工资:e.m_salaryendl; cout实付工资:e.m_salary-e.m_insurance-e.m_taxendl; } void input() { string num,name,dep; double salary,ins,tax; cout请输入员工编号:; cinnum; cout请输入员工姓名:; cinname; cout请输入员工部门:; cindep; cout请输入员工保险:; cinins; assert(!cin.fail()); cout请输入员工税金:; cintax; assert(!cin.fail()); cout请输入员工应付工资:; cinsalary; assert(!cin.fail()); employee temp; temp.m_dep=dep; temp.m_insurance=ins; temp.m_name=name; temp.m_num=num; temp.m_salary

文档评论(0)

junjun37473 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档