职工工资程序c语言doc,职工工资管理c语言程序设计指导书.doc

PAGE / NUMPAGES

用的时候,把注释"delete this line"那行所在的代码删除或修改就OK了.

/*

Microsoft Visual C++ .NET编译通过

by 做他@07.12.29

*/

#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) 退出程序。

*/

list 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<

cout<

cout<

int choose=0。

cin>>choose。

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<

cin>>choice。

if (choice==1) show_name()。

if (choice==2) show_dep()。

if (choice==3)

{

cout<

cin>>choose。

assert(!cin.fail())。

continue。

}

}

if (choose==5) show_all()。

cout<

cin>>choose。

assert(!cin.fail())。

}

return 0。

}

void print(const employee &e)

{

cout<

cout<

cout<

cout<

cout<

cout<

cout<

}

void input()

{

string num,name,dep。

double salary,ins,tax。

cout<

cin>>num。

cout<

cin>>name。

cout<

cin>>dep。

cout<

cin>>i

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值