版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、C语言课程设计设计题目:职工信息管理系统设计目的当今时代是飞速发展的信息时代,在各行各业中离不开信息处理,这正是计算机被广泛应用于信息系统的环境。计算机的最到好处的于利用它能够进行信息管理,使用计算机进行信息控制,不仅提高了工作效率,而且大大的提高了其安全性。尤其对于复杂的信息管理,计算机能够充分发挥它的优越性。计算机进行信息管理与信息管理系统的开发密切相关,系统的开发是系统管理的前提。本系统就是为了管理好学生选课信息而设计的。数据处理手工操作,工作量大,出错率高,出错后不易更改,造成了时间上的浪费。基于这个问题,我认为有必要建立一个学生选课系统,使学生选课信息管理工作规范化、系统化、程序化,
2、避免学生选课管理的随意性,提高信息处理的速度和准确性,能够及时、准确、有效的查询和修改选课情况。二、题目说明: 系统功能简介:系统以菜单方式工作1) 职工信息录入(文件保存职工信息)2) 输出职工信息、浏览职工信息3) 查询职工信息4) 根据员工号查找职工信息5) 根据工资、年龄、性别对职工信息进行排序6) 删除职工信息3. 设计实施:#include #include #include typedef struct Empk int EmpNum; /* staff number */ char EmpName12; /* name*/ int Sex; /*sex 1- woman 2-
3、man*/ int Old; /* old*/ int Cult; /*education background 1-specilist 2-doctor 3-others*/ int Salary; /*salary*/ char Address12; /* address*/ int Tell; /*telephone number*/Emp;Emp emp100;void open() int i; FILE *fp; if(fp=fopen(wyl,rb+)=NULL) printf(can not do it! Because of no file of informationn);
4、 exit(0); for(i=0;i100;i+) if(fread(&empi,sizeof(Emp),1,fp)=0) printf(Fail to outputn); exit(0); fclose(fp);void close() /*跳出*/ int i; FILE *fp; if(fp=fopen(wyl,wr+)=NULL) printf(can not do it!n); exit(0); for(i=0;i100;i+) fwrite(&empi,sizeof(Emp),1,fp); fclose(fp);void inputEmpInfo() /*输入信息*/ int i
5、,k; for(i=0;i100;i+) printf(Please enter the staffs :nnumber:); scanf(%d,&empi.EmpNum); printf(nname:); scanf(%s,empi.EmpName); printf(nsex : 1- woman 2- man:); scanf(%d,&empi.Sex); printf(nold:); scanf(%d,&empi.Old); printf(nEducation background:1-specialist 2-doctor 3-others); scanf(%d,&empi.Cult)
6、; printf(nsalary:); scanf(%d,&empi.Salary); printf(naddress:); scanf(%s,empi.Address); printf(ntellphone:); scanf(%d,&empi.Tell); printf(continue?(1.yes 2.no); scanf(%d,&k); if(k=2) break; close();void reorder() /*修改*/int i,s,j,k,l;Emp temp;open();printf(nChoose which category would you want to usen
7、1-sex n2-salary(from maximum to minimum) n3-old (from maximum to minimum) n ( enter the corresponding nember) n);scanf(%d,&i);switch(i) case 1:printf(nchoose which sex do you want to inquire? 1-woman 2 -man );scanf(%d,&s);for(j=0;empj.EmpNum!=0;j+) if(empj.Sex=s) printf( number:%dn,empj.EmpNum); pri
8、ntf(name:%s, empj.EmpName); printf(nsex 1- woman 2- man:%d, empj.Sex); printf(nold:%d, empj.Old); printf(neducation background:%dttt 1-specialist 2-doctor 3-others ,empj.Cult); printf(nsalary:%d, empj.Salary); printf(naddress:%s, empj.Address); printf(ntelephone nember :%d, empj.Tell); break;case 2:
9、 for(k=0;empk.EmpNum!=0;j+ ) for(l=k;empl.EmpNum!=0;l+) if(empl.Salaryempl+1.Salary) temp=empl;empl=empl+1;empl+1=temp; printf( number:%dn,empk.EmpNum); printf(name:%s,empk.EmpName); printf(nsex 1- woman 2- man:%d,empk.Sex); printf(nold:%d,empk.Old); printf(neducation background:%dttt 1-specialist 2
10、-doctor 3-others ,empk.Cult); printf(nsalary:%d,empk.Salary); printf(nadress:%s,empk.Address); printf(ntelephone nember :%d,empk.Tell); break;case 3: for(k=0;empk.EmpNum!=0;j+ ) for(l=k;empl.EmpNum!=0;l+) if(empl.Oldempl+1.Old) temp=empl;empl=empl+1;empl+1=temp; printf( number:%dn,empk.EmpNum);print
11、f(name:%s,empk.EmpName);printf(nsex 1- woman 2- man:%d,empk.Sex);printf(nold:%d,empk.Old);printf(neducation background:%dttt 1-specialist 2-doctor 3-others,empk.Cult);printf(nsalary:%d,empk.Salary);printf(naddress:%s,empk.Address);printf(ntelephone nember :%d,empk.Tell); break; void show()int j;open
12、();printf(n-informations of sraffs-n);for(j=0;empj.EmpNum!=0;j+) printf(number:%dn,empj.EmpNum); printf(name:%s,empj.EmpName); printf(nsex 1- woman 2- man:%d,empj.Sex); printf(nold:%d,empj.Old); printf(neducation background:%d 1-specialist 2-doctor 3-others ,empj.Cult); printf(nsalary:%d,empj.Salary
13、); printf(nadress:%s,empj.Address); printf(ntelephone nember :%d,empj.Tell); void deleteEmp() int j,k,m=1,d,i=0; open(); printf(Enter the number whose date you want to delete:n); scanf(%d,&d); for(j=0;empj.EmpNum!=0;j+) if(empj.EmpNum=d) for(k=j;empj.EmpNum!=0;k+) empk=empk+1; i+; if(i=0) printf(The
14、 staffs informations manage systerm has no date of the number your entered!n); close(); printf(succeeed to deleten);void findByEmpName() /*查询*/int j,i,k=0;open();printf(Please enter the number :n);scanf(%d,&i);for(j=0;empj.EmpNum!=0;j+) if(empj.EmpNum=i) printf(n-information of your want -n); printf
15、(number:%dn,empj.EmpNum); printf(name:%s,empj.EmpName); printf(nsex 1- woman 2- man:%d,empj.Sex); printf(nold:%d,empj.Old); printf(neducation background:%dtttt 1-specialist 2-doctor 3-others ,empj.Cult); printf(nsalary:%d,empj.Salary); printf(nadress:%s,empj.Address); printf(ntelephone number:%d,emp
16、j.Tell); k+; if(k=0) printf(nHave no date of the number!n);void menu()printf(n-n); printf(n Wellcome to the staff manage styterm n); printf(n-n); printf(Please choose number for what are you want to do:nn); printf(n 1 - input: Complete inputing workers information.); printf(n 2 - reorder: Make the n
17、ew order of the information.); printf(n 3 - delete: Delete the information of the staff.); printf(n 4 - output: Display all worker of information.); printf(n 5 - inquire.); printf(n 0 - exitn);void main() int op,choice=1; while(choice=1) menu(); printf(nPlease enter your order:n); scanf(%d,&op); switch(op)case 1: inputEmpInfo();
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年中煤开发公司所属新疆分公司面向中煤集团公开招聘笔试历年参考题库附带答案详解
- 2025年中国铁路郑州局集团有限公司招聘普通高校毕业生1852人(二)笔试历年参考题库附带答案详解
- 2025年中国石油大港油田分公司博士后招聘笔试历年参考题库附带答案详解
- 2025年中国大唐集团能源投资有限责任公司应届高校毕业生招聘笔试历年参考题库附带答案详解
- 2025年中国东航股份空保管理部校园招聘笔试历年参考题库附带答案详解
- 2025年东台市国瑞新能源科技有限公司新能源项目总监公开招聘(一)笔试历年参考题库附带答案详解
- 基坑降水工程施工及沉降监测方案
- 2026年广东省罗定市高一数学下册期末考试模拟检测卷含答案【巩固】
- 2026年浙江省嵊州市高一数学下册期末考试模拟测试卷附答案【典型题】
- 初中三年级化学二轮复习教案:科学探究与实验方案的设计、评价及创新
- 湖北省武汉市江汉区北湖小学2025年数学三下期末质量检测模拟试题含解析
- 2026年注册安全工程师考试《安全管理》冲刺押题试卷(含解析)
- 2026-2030中国碳化硅(SiC)半导体器件市场发展现状及未来供需平衡预测报告
- (2026年)手术安全核查与风险评估课件
- 2025北京市朝阳区太阳宫乡社区工作者招聘考试真题及答案
- 2026年国家电投招聘笔试参考题库含答案解析
- 防范银狐木马病毒与补贴诈骗信息课件
- 2026版中央安全生产考核巡查明查暗访应知应会
- 肥西反邪教协会工作制度
- 六化建设培训
- 2026年慢性阻塞性肺疾病基层规范化诊疗指南解读
评论
0/150
提交评论