c语言课程设计职工工资管理系统源代码

上传人:夏** 文档编号:493244803 上传时间:2023-03-22 格式:DOC 页数:40 大小:160.50KB
返回 下载 相关 举报
c语言课程设计职工工资管理系统源代码_第1页
第1页 / 共40页
c语言课程设计职工工资管理系统源代码_第2页
第2页 / 共40页
c语言课程设计职工工资管理系统源代码_第3页
第3页 / 共40页
c语言课程设计职工工资管理系统源代码_第4页
第4页 / 共40页
c语言课程设计职工工资管理系统源代码_第5页
第5页 / 共40页
点击查看更多>>
资源描述

《c语言课程设计职工工资管理系统源代码》由会员分享,可在线阅读,更多相关《c语言课程设计职工工资管理系统源代码(40页珍藏版)》请在金锄头文库上搜索。

1、.绝对可以完美运行,下面有运行图片#include/调用库函数#include/字符串处理#include/控制台输入输出#include/定义杂项函数及内存分配函数#defineN2/宏定义以3代替N/*函数声明*/voidenter();intmenu();voidinput();voidoutput();voidsearch();voidsearch_employeeid();voidsearch_name();voidedit();voidarray();voidarray_basesalary();voidarray_postwage();voidarray_totalwage();

2、voidstatistics();voidsave();voidload();/*职工类型定义*/structemployeecharemployeeid10;charname10;charsex10;intage;floatbasesalary;floatpostwage;floattotalwage;/*职工变量定义*/structemployeeempN;structemployeereplace;structemployee*p=emp;/*系统主函数*/voidmain()intc;while(1)printf(nnnn);printf(欢迎进入职工工资管理系统nnn);printf

3、(1进入管理系统nn);printf(0退出nn);printf(nnnn);printf(请输入你选择:n);scanf(%d,&c);switch(c)case1:enter();break;case0:printf(谢谢使用!n);exit(0);/*功能:登陆函数,进行密码验证*/voidenter()charq;charkey10,password10=china;intk=1,i;printf(请输入密码:n);for(i=0;i5;i+)q=getch();keyi=q;printf(*);while(k=3)if(strncmp(key,password,5)=0)while(

4、1)inta;/system(cls);a=menu();switch(a)case1:input();break;case2:output();break;case3:search();break;case4:edit();break;case5:array();break;case6:load();statistics();break;case0:printf(nn谢谢使用!nnnn);save();exit(0);elsek+;printf(输入密码错误!请再次输入:);for(i=0;i2)if(strncmp(password,key,5)=0)continue;elseprintf

5、(输入密码错误三次,系统将自动退出!n);exit(0);/*功能:主菜单函数参数:a类型:int说明:变量返回值:a*/intmenu()inta;printf(nn);printf(|*欢迎进入职工工资管理系统*|n);printf(|n);printf(|n);printf(|1职工信息输入|n);printf(|n);printf(|2职工信息输出|n);printf(|n);printf(|3职工信息查询|n);printf(|n);printf(|4职工信息修改|n);printf(|n);printf(|5工资排序|n);printf(|n);printf(|6工资统计|n);p

6、rintf(|n);printf(|0退出|n);printf(|n);printf(|n);printf(|*|n);printf(nn);printf(请输入你所选择的选项:);scanf(%d,&a);while(a6|a0)printf(error!n);printf(请重新输入你所选择的选项:);scanf(%d,&a);returna;/*功能:职工信息输入*/voidinput()intc;p=emp;printf(进入职工信息输入模块nnn);for(c=0;cemployeeid);if(strcmp(p-employeeid,0)!=0)printf(请输入职工姓名:n);

7、scanf(%s,p-name);printf(请输入职工性别:n);scanf(%s,&p-sex);printf(请输入职工年龄:n);scanf(%d,&p-age);printf(请输入职工基本工资:n);scanf(%f,&p-basesalary);printf(请输入职工岗位工资:n);scanf(%f,&p-postwage);printf(职工信息输入完成!nn);elsereturn;save();/*功能:职工信息输出*/voidoutput()intj;load();p=emp;printf(进入职工信息输出模块nnn);printf(-n);printf(|职工号|姓名|性别|年龄|基本工资|岗位工资|总工资|n);printf(-n);for(j=0;jN;j+)pj.totalwage=pj.postwage+pj.basesalary;printf(|%10s|%9s|%7s|%5d|%10.2f|%10.2f|%10.2f|n,pj.employeeid,pj.name,pj.sex,

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 高等教育 > 研究生课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号