职工信息管理系统LG GROUP system office room 【LGA16H-LGYY-LGUA8Q8-LGA162】信息科学与技术学院程序设计基础课程设计报告题目名称:职工信息管理系统学生姓名:董吉华学号:189专业班级:电子信息工程1班指导教师:郭理2017年 12月 30日目录一.课程设计题目与要求 (3)设计题目 (3)设计要求 (3)二.总体设计 (4)总体功能框架 (4)数据结构概要设计 (5)三.详细设计 (6)数据结构详细设计 (6)系统功能详细设计 (7)主函数 (7)主界面函数 (9)输入函数 (11)输出函数 (12)查找函数 (14)排序函数 (16)删除或修改函数 (18)结束函数 (20)四.运行结果 (21)主界面 (21)主菜单界面 (23)录入职工信息界面 (24)五.课程设计总结 (34)编程中的问题及解决方法 (34)小结 (34)心得体会 (34)程序设计方法 (35)参考文献 (35)《职工信息管理系统》一.课程设计题目与要求设计题目职工信息管理系统设计要求职工信息包括职工号、姓名、性别、年龄、学历、工资、住址、电话等(职工号不重复)。
试设计一职工信息管理系统,使之能提供以下功能:系统以菜单方式工作(2)职工信息录入功能(职工信息用文件保存)(3)职工信息浏览功能(4)查询和排序功能:(至少一种查询方式)按工资查询按学历查询等(5)职工信息删除、修改功能二.总体设计总体功能框架实现航班信息的输入,航班信息的输出,航班信息的查找,订票系统,退票系统功能三.if条件判断,保证职工的职工号不会重复。
图4-8 浏览航班信息按任意键返回主菜单显示界面该界面显示输入到文档的所有职工信息,包括之前写到文档中的职工信息。
详细程序运行过程见下图:图4-9图4-10查询界面该界面通过输入工资或者学历,能查询符合标准的员工。
如果没有符合标准的,输出“没有该职工信息,查无此人!!”字样,输入1代表按工资查询,输入2代表按学历查询。
详细过程,请看程序演示。
按数字1:按照工资查询,输入9000,结果如图显示图4-11按数字2:按照学历查询,输入本科,结果如图显示图4-12若查不到人显示查无此人排序界面该界面通过对指定文档读取,输入1代表按照职工号从小到大排序,输入2代表按照工资从小到大排序。
并将排序结果保存到指定文档中。
输入1图4-13输入2图4-14删除或修改界面该界面该界面通过对指定文档读取,1代表删除,2代表修改。
删除是根据职工号进行删除,修改可以单项修改,即可以只改其中一项内容。
详细程序运行见下图删除功能:图4-15可以选择是否确定删除,若不删,按2即可取消操作,若坚持删,按1。
图4-16选择删除,显示剩余职工数据,并询问是否继续。
若按2:则是询问是否继续,若为继续,返回上一个界面,若选择否,则返回菜单界面:图4-17该界面该界面通过对指定文档读取,1代表删除,2代表修改。
删除是根据职工号进行删除,修改可以单项修改,即可以只改其中一项内容。
修改功能:3)该函数其实是删除函数的一个子函数,受删除函数调用,删除函数把值传给修改函数,修改函数可以判断职工号是否重复。
并且可以只修改职员的部分信息。
图4-184)判断是否确定修改,若是,按1,若不是,按2,直接返回菜单函数中,若按1,会出现数字选择,通过选择,选择要修改的类型。
图4-19注意(在1职工号中,有辨别是否有重复现象,同样输错之后,还有两次机会,若都错,就退出系统)1: 职工号图4-20下面以职工号为例,输出正确操作:图4-21若按1表示确定,则返回到删除函数中,若按2,则返回到菜单函数中。
结束程序界面图4-22表明此程序为退出程序。
编程中的问题及解决方法(1)一开始查询模块第一种方法并不能运行,我不停的查阅资料,想做一种简便又可行的方法,这个模块发费了我很长时间,但做出来的那一刻内心无比的喜悦,过程再艰苦,但我收获了巨大的知识财富,同时我也更相信努力钻研必能取得成果。
(2)程序编译后有时并不能读懂错误的意思或者找不到错误在哪,百度则是很好的方法了。
小结此次程序设计主要用了函数的调用,if、else选择语句,switch语句,相关文件知识,结合课本知识加上自己的应用结果颇为令人满意,但是还有很多的缺陷与不足。
在实践过程中,自己编程的时候常常会犯错误,并总结了一些克服缺点的方法。
而且更深刻体会到程序设计中最重要的一部分不是编写源程序,而是调试过程。
只有经过调试程序,我们才能掌握正确的语法知识及把问题的解决方法用程序语言来表达。
在设计程序的同时也增长了翻阅有关文献的能力,加强了实践能力及自学能力,培养了分析问题、编程和动手能力,掌握了程序设计基本技能。
以下是课程设计中的错误总结和分析:心得体会通过此次学生成绩信息管理系统,让我熟悉了软件开发的流程,相信在以后的工作中我能在最短的时间内投入到大的程序开发项目中。
在进行课程设计的前两天,不知道从何入手,很是不解,不知道我们究竟要做什么。
后来通过上网找资料,才发现有好多做法,根本就看不完,此时才真正意识到差距所在。
于是,通过借鉴网络作品,才发现作品并不是一味的照搬照抄才实用,集众家之所成,不断完善,才能造出属于自己的作品,并且实用。
在整个课程设计中,我认为最重要的就是耐心和细心。
细心,就是在编写过程中注意拼写,仔细编写程序;耐心,就是程序编译中出现很多错误的时候能够耐心去修改,只有这样,才能很好的完成程序。
虽然在整个过程中出现了不少错误,但最终还是圆满完成了,此次程序设计的经历让我学到了太多,同时也让我理解到参加的项目越大越能学到知识,因此以后我会积极主动的去参加一些项目,以此来提高自己的技能和编程经验。
①认真读题,审题。
②将一个大程序分成若干个小程序,逐步攻破。
参考文献参考文献C程序设计C语言从入门到精通系统源程序:#include<>#include<>#include<>#include<>;Sleep(100);}system("cls");mainhome();break;}k++;if(k<3){printf("\n用户名或密码无效请重新输入:\n"); }if(k==3){printf("\n连续输入错误3次将退出程序\n"); Sleep(2000);exit(0);}}}void mainhome(){int n;printf("\n\n\n\n");printf("\t\t\t\t┃************************************************************┃\n");printf("\t\t\t\t┃* * *┃\n");printf("\t\t\t\t┃* 1.录入员工资料 * 2.显示员工资料 *┃\n");printf("\t\t\t\t┃* * *┃\n");printf("\t\t\t\t┃************************************************************┃\n");printf("\t\t\t\t┃* * *┃\n");printf("\t\t\t\t┃* 3.员工信息查询 * 4.员工信息排序 *┃\n");printf("\t\t\t\t┃* * *┃\n");printf("\t\t\t\t┃************************************************************┃\n");printf("\t\t\t\t┃* * *┃\n");printf("\t\t\t\t┃* 5.删除/修改记录 * 0.退出信息系统 *┃\n");printf("\t\t\t\t┃* * *┃\n");printf("\t\t\t\t┃************************************************************┃\n");printf("\n请选择:"); struct worker *m;m=work;scanf("%d",&n);switch(n){case 1:input(work);break;case 2:display(m);break;case 3:chazhao(work);break;case 4:paixu(work);break;case 5:shanchu(work);break;case 0:left();break;}}void input(struct worker work[100]){int i;FILE *irry;umber,work[i].name,work[i].xingbie,&work[i].age,work[i].xueli,&work[i].wage,work[i].address,work[i].telephone);}elsebreak;}int k=i;system("cls");char c;printf("员工工号:\n");scanf("%lf",&work[k].number);for(i=0;i<k;i++){if(work[k].number<0)printf("请输入正整数:\n");int m=0;for(m=0;m<4;m++){if(work[i].number==work[k].number){printf("该职工号和之前%d员工相同,请重新输入:\n",i+1);printf("员工工号:\n");scanf("%lf",&work[k].number);if(work[i].number!=work[k].number)break;if(work[i].number==work[k].number&&m<3){printf("该职工号和之前%d员工相同,请重新输入:\n",i+1);printf("员工工号:\n");scanf("%lf",&work[k].number);}if(m>=4);exit(0);}}}printf("姓名:\n");scanf("%s",work[k].name);printf("性别(F:M):\n");scanf("%s",work[k].xingbie);printf("年龄:\n");scanf("%d",&work[k].age);printf("学历(中专,大专,本科,硕士,博士,其它):\n");scanf("%s",work[k].xueli);printf("工资:\n");scanf("%d",&work[k].wage);printf("住址:\n");scanf("%s",work[k].address);printf("电话:\n");scanf("%s",work[k].telephone);printf("\n是否继续输入(y/n):\n");fprintf(irry,"%.0f\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",work[k].number,work[k].name,wo rk[k].xingbie,work[k].age,work[k].xueli,work[k].wage,work[k].address,work[k].telephone);if(fclose(irry)){printf("sorry,I can not close!!\n");exit(0);}do{c=getchar();if(c=='y'||c=='Y'){if(k<100){input (work);}else{printf("记录数已满\n");Sleep(2000);system("cls");mainhome();}}else if(c=='n'||c=='N'){system("cls");mainhome();}else ;}while((c!='y')&&(c!='n')&&(c!='Y')&&(c!='N'));}void display(struct worker *ab){FILE *read;{printf("sorry,I’m error:\n");exit(0);}int i;char c;system("cls");printf("\t工号\t\t姓名\t性别\t年龄\t学历\t工资\t住址\t\t电话\n");for(i=0;i<100;i++){while(!feof(read)){fscanf(read,"\t%lf\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",&work[i].number,work[i].name,work[i]. xingbie,&work[i].age,work[i].xueli,&work[i].wage,work[i].address,work[i].telephone);printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[i].number,work[i].name,work[i] .xingbie,work[i].age,work[i].xueli,work[i].wage,work[i].address,work[i].telephone);}}if(fclose(read)){printf("sorry,I can not close!!\n");exit(0);}printf("\n\n按任意键返回\n");c=getchar();getchar();system("cls");mainhome();}void chazhao(struct worker work[100]){int i,j;FILE *read;int choice;int findmoney;char find[20];char c;system("cls");printf("\t\t请选择查询功能:\n");printf("\t1.按工资查询\n");printf("\t2.按学历查询\n");printf("请输入选择\t1\tor\t2\n");{printf("sorry,I’m error:\n");exit(0);}do{scanf("%d",&choice);}while ((choice!=1)&&(choice!=2));int fib=0;if (choice==1){printf("\n\t请输入要查询的工资\n");scanf("%d",&findmoney);printf("\n正在查询,请稍候");for(i=0;i<10;i++){printf(".");Sleep(100);}system("cls");for (i=0;i<100;i++){fscanf(read,"\t%lf\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",&work[i].number,work[i].name,w ork[i].xingbie,&work[i].age,work[i].xueli,&work[i].wage,work[i].address,work[i].telephone);if (findmoney==work[i].wage){printf("\n\n\t工号\t\t姓名\t性别\t年龄\t学历\t工资\t住址\t\t电话\n");printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[i].number,work[i].name,work[i].xingbie,work[i].age,work[i].xueli,work[i].wage,work[i].address,work[i].telephone);fib=1;}}if(fib==0){printf("\n\n\t\t");printf("没有该职工信息,查无此人!!\n");}}if (choice==2){printf("\n\n请输入要查询的职工学历:\n");scanf("%s",find);printf("\n正在查询,请稍候");for(i=0;i<20;i++){printf(".");Sleep(100);}system("cls");printf("\n\n\t工号\t\t姓名\t性别\t年龄\t学历\t工资\t住址\t\t电话\n");for (i=0;i<100;i++){fscanf(read,"\t%lf\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",&work[i].number,work[i].name,w ork[i].xingbie,&work[i].age,work[i].xueli,&work[i].wage,work[i].address,work[i].telephone);if(!strcmp(find,work[i].xueli)){printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[i].number,work[i].name, work[i].xingbie,work[i].age,work[i].xueli,work[i].wage,work[i].address,work[i].telephone);fib=1;}}if(fib==0){printf("\n\n\t\t");printf("对不起,该职工不存在!!\n");}}if(fclose(read)){printf("sorry,I can not close!!\n");exit(0);}printf("\n\n按任意键返回\n");c=getchar();getchar();system("cls");mainhome();}void paixu(struct worker work[100]){system("cls");printf("\t\t请选择排序方式:\n");printf("按职工号排序请按1:\n");printf("按工资排序请按2:\n");int n;FILE *read;FILE *op;char c;scanf("%d",&n);{printf("sorry,I’m error:\n");exit(0);}int i,j;if(n==1){for(i=0;i<100;i++){if(!feof(read) ){fscanf(read,"\t%lf\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",&work[i].number,work[i].name,w ork[i].xingbie,&work[i].age,work[i].xueli,&work[i].wage,work[i].address,work[i].telephone);}elsebreak;}int k=i;int temp;double mn;char irry[80];umber>work[j+1].number){mn=work[j].number;work[j].number=work[j+1].number;work[j+1].number=mn;strcpy(irry,work[j].name);strcpy(work[j].name,work[j+1].name);strcpy(work[j+1].name,irry);strcpy(irry,work[j].xingbie);strcpy(work[j].xingbie,work[j+1].xingbie);strcpy(work[j+1].xingbie,irry);temp=work[j].age;work[j].age=work[j+1].age;work[j+1].age=temp;strcpy(irry,work[j].xueli);strcpy(work[j].xueli,work[j+1].xueli);strcpy(work[j+1].xueli,irry);temp=work[j].wage;work[j].wage=work[j+1].wage;work[j+1].wage=temp;strcpy(irry,work[j].address);strcpy(work[j].address,work[j+1].address);strcpy(work[j+1].address,irry);strcpy(irry,work[j].telephone);strcpy(work[j].telephone,work[j+1].telephone);strcpy(work[j+1].telephone,irry);}}}for(i=0;i<k;i++){printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[i].number,work[i].name, work[i].xingbie,work[i].age,work[i].xueli,work[i].wage,work[i].address,work[i].telephone);}{printf("sorry,I’m error:\n");exit(0);}for(i=0;i<k;i++){fprintf(op,"%.0f\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",work[i].number,work[i].name,wor k[i].xingbie,work[i].age,work[i].xueli,work[i].wage,work[i].address,work[i].telephone);}if(fclose(op)){printf("sorry,I can not close!!\n");exit(0);}printf("\n\n按任意键返回\n");c=getchar();getchar();system("cls");mainhome();}if(n==2){for(i=0;i<100;i++){if(!feof(read) ){fscanf(read,"\t%lf\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",&work[i].number,work[i].name,w ork[i].xingbie,&work[i].age,work[i].xueli,&work[i].wage,work[i].address,work[i].telephone);}elsebreak;}int k=i;int temp;double mn;char irry[80];age>work[j+1].wage){mn=work[j].number;work[j].number=work[j+1].number;work[j+1].number=mn;strcpy(irry,work[j].name);strcpy(work[j].name,work[j+1].name);strcpy(work[j+1].name,irry);strcpy(irry,work[j].xingbie);strcpy(work[j].xingbie,work[j+1].xingbie);strcpy(work[j+1].xingbie,irry);temp=work[j].age;work[j].age=work[j+1].age;work[j+1].age=temp;strcpy(irry,work[j].xueli);strcpy(work[j].xueli,work[j+1].xueli);strcpy(work[j+1].xueli,irry);temp=work[j].wage;work[j].wage=work[j+1].wage;work[j+1].wage=temp;strcpy(irry,work[j].address);strcpy(work[j].address,work[j+1].address);strcpy(work[j+1].address,irry);strcpy(irry,work[j].telephone);strcpy(work[j].telephone,work[j+1].telephone);strcpy(work[j+1].telephone,irry);}}}for(i=0;i<k;i++){printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[i].number,work[i].name, work[i].xingbie,work[i].age,work[i].xueli,work[i].wage,work[i].address,work[i].telephone);}{printf("sorry,I’m error:\n");exit(0);}for(i=0;i<k;i++)fprintf(op,"%.0f\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",work[i].number,work[i].name,work [i].xingbie,work[i].age,work[i].xueli,work[i].wage,work[i].address,work[i].telephone);if(fclose(op)){printf("sorry,I can not close!!\n");exit(0);}printf("\n\n按任意键返回\n");c=getchar();getchar();system("cls");mainhome();}}void shanchu(struct worker work[100]){int n,i,match;char c;system("cls");FILE *read;FILE *op;double vb;umber,work[i].name,work[i].xingbie,&work[i].age,work[i].xueli,&work[i].wage,work[i].address,work[i].telephone);}elsebreak;}int k=i;int j;int d;umber==vb){printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[i].number,work[i].name,work[i] .xingbie,work[i].age,work[i].xueli,work[i].wage,work[i].address,work[i].telephone);printf("\n\n\n");printf("\t\t是否确定删除\n");printf("1\t代表确定\t\t2\t代表否定:\n");scanf("%d",&d);if(d==1){match=1;for(j=0;j<k;j++){fscanf(read,"\t%lf\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",&work[j].number,work[j].name,work[j]. xingbie,&work[j].age,work[j].xueli,&work[j].wage,work[j].address,work[j].telephone);}for(j=i;j<k-1;j++){work[j].number=work[j+1].number;strcpy(work[j].name,work[j+1].name);strcpy(work[j].xingbie,work[j+1].xingbie);work[j].age=work[j+1].age;strcpy(work[j].xueli,work[j+1].xueli);work[j].wage=work[j+1].wage;strcpy(work[j].address,work[j+1].address);strcpy(work[j].telephone,work[j+1].telephone);}k--;for(j=0;j<k;j++)printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[j].number,work[j].name, work[j].xingbie,work[j].age,work[j].xueli,work[j].wage,work[j].address,work[j].telephone);{printf("sorry,I’m error:\n");exit(0);}for(j=0;j<k;j++){fprintf(op,"\t%\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",work[j].number,work[j].name,work[ j].xingbie,work[j].age,work[j].xueli,work[j].wage,work[j].address,work[j].telephone);}if(d=2){match=1;break;}}}}if(!match) printf("\n没有要找的工号.\n");printf("\n是否继续删除(y/n)\n");do{c=getchar();if(c=='y'||c=='Y'){shanchu(work);}if(c=='n'||c=='N'){system("cls");if(fclose(op)){printf("sorry,I can not close!!\n");exit(0);}mainhome();}}while((c!='y')&&(c!='n')&&(c!='Y')&&(c!='N'));}if(n=2){printf("本系统将按照职工号查找职工:\n");printf("请输入职工的职工号码:\n");{printf("sorry,I’m error:\n");exit(0);}scanf("%lf",&vb);for(i=0;i<100;i++){if(!feof(read) ){fscanf(read,"\t%lf\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",&work[i].number,work[i].name,w ork[i].xingbie,&work[i].age,work[i].xueli,&work[i].wage,work[i].address,work[i].telephone);}elsebreak;}int c;umber){nu=1;break;}}intsv;f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[i].number,work[i].name,work[i].xingbie, work[i].age,work[i].xueli,work[i].wage,work[i].address,work[i].telephone);printf("是否确定修改该职工信息\n");printf("\n\t\t1\t代表确定\t\t2代表否定\n\n");scanf("%d",&sv);if(sv==1){xiugai(work,i);}if(sv==2){if(fclose(read)){printf("sorry,I can not close!!\n");exit(0);}mainhome();}}}}void xiugai(struct worker work[100],int a){int n,i;int m;FILE *read;FILE *fp;printf("请输入数字,选择要修改的信息:\n");printf("\t\t1:职工号\n\t\t2:姓名\n\t\t3:性别\n\t\t4:年龄\n\t\t5:学历\n\t\t6:工资\n\t\t7:地址\n\t\t8:联系方式\n");scanf("%d",&n);{printf("sorry,I’m error:\n");exit(0);}for(i=0;i<100;i++){if(!feof(read) ){fscanf(read,"\t%lf\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",&work[i].number,work[i].name,w ork[i].xingbie,&work[i].age,work[i].xueli,&work[i].wage,work[i].address,work[i].telephone);}elsebreak;}if(fclose(read)){printf("sorry,I can not close!!\n");exit(0);}int k=i;char c;double vb;char *op;char mn[80];op=mn;if(n==1){printf("请输入新的职工号:\n");scanf("%lf",&vb);for(i=0;i<k;i++){if(vb<0)printf("请输入正整数:\n");int m=0;for(m=0;m<4;m++){if(work[i].number==vb){printf("该职工号和之前%d员工相同,请重新输入:\n",i+1);printf("员工工号:\n");scanf("%lf",&vb);if(work[i].number!=vb)break;if(work[i].number==vb&&m<3){printf("该职工号和之前%d员工相同,请重新输入:\n",i+1);printf("员工工号:\n");scanf("%lf",&vb);}if(m>=4);exit(0);}}}work[a].number=vb;{printf("sorry,I’m error:\n");exit(0);}printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[a].number,work[a].name,work[a] .xingbie,work[a].age,work[a].xueli,work[a].wage,work[a].address,work[a].telephone);for(i=0;i<k;i++){fprintf(fp,"\t%\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",work[i].number,work[i].name,work[ i].xingbie,work[i].age,work[i].xueli,work[i].wage,work[i].address,work[i].telephone);}if(fclose(fp)){printf("sorry,I can not close!!\n");exit(0);}printf("\n是否继续修改(y/n)\n");}if(n==2){printf("请输入新的职工姓名:\n");scanf("%s",op);printf("\n");printf("\n");printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[a].number,work[a].name, work[a].xingbie,work[a].age,work[a].xueli,work[a].wage,work[a].address,work[a].telephone);strcpy(work[a].name,op);printf("\n\n");printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[a].number,work[a].name, work[a].xingbie,work[a].age,work[a].xueli,work[a].wage,work[a].address,work[a].telephone);{printf("sorry,I’m error:\n");exit(0);}for(i=0;i<k;i++){fprintf(fp,"\t%\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",work[i].number,work[i].name,work[ i].xingbie,work[i].age,work[i].xueli,work[i].wage,work[i].address,work[i].telephone);}if(fclose(fp)){printf("sorry,I can not close!!\n");exit(0);}printf("\n是否继续修改(y/n)\n");}if(n==3){printf("请输入新的职工性别:\n");scanf("%s",op);printf("\n");printf("\n");printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[a].number,work[a].name, work[a].xingbie,work[a].age,work[a].xueli,work[a].wage,work[a].address,work[a].telephone);strcpy(work[a].xingbie,op);printf("\n\n");printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[a].number,work[a].name, work[a].xingbie,work[a].age,work[a].xueli,work[a].wage,work[a].address,work[a].telephone);{printf("sorry,I’m error:\n");exit(0);}for(i=0;i<k;i++){fprintf(fp,"\t%\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",work[i].number,work[i].name,work[ i].xingbie,work[i].age,work[i].xueli,work[i].wage,work[i].address,work[i].telephone);}if(fclose(fp)){printf("sorry,I can not close!!\n");exit(0);}printf("\n是否继续修改(y/n)\n");}if(n==4){printf("请输入新的职工年龄:\n");scanf("%d",&m);f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[a].number,work[a].nam e,work[a].xingbie,work[a].age,work[a].xueli,work[a].wage,work[a].address,work[a].telephone);work[a].age=m;printf("\n\n");printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[a].number,work[a].name, work[a].xingbie,work[a].age,work[a].xueli,work[a].wage,work[a].address,work[a].telephone);{printf("sorry,I’m error:\n");exit(0);}for(i=0;i<k;i++){fprintf(fp,"\t%\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",work[i].number,work[i].name,work[ i].xingbie,work[i].age,work[i].xueli,work[i].wage,work[i].address,work[i].telephone);}if(fclose(fp)){printf("sorry,I can not close!!\n");exit(0);}printf("\n是否继续修改(y/n)\n");}if(n==5)printf("请输入新的职工学历:\n");scanf("%s",op);printf("\n");printf("\n");printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[a].number,work[a].name, work[a].xingbie,work[a].age,work[a].xueli,work[a].wage,work[a].address,work[a].telephone);strcpy(work[a].xueli,op);printf("\n\n");printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[a].number,work[a].name, work[a].xingbie,work[a].age,work[a].xueli,work[a].wage,work[a].address,work[a].telephone);{printf("sorry,I’m error:\n");exit(0);}for(i=0;i<k;i++){fprintf(fp,"\t%\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",work[i].number,work[i].name,work[ i].xingbie,work[i].age,work[i].xueli,work[i].wage,work[i].address,work[i].telephone);}if(fclose(fp)){printf("sorry,I can not close!!\n");exit(0);}printf("\n是否继续修改(}if(n==6){printf("请输入新的职工工资:\n");scanf("%d",&m);printf("\n");printf("\n");printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[a].number,work[a].name, work[a].xingbie,work[a].age,work[a].xueli,work[a].wage,work[a].address,work[a].telephone);work[a].wage=m;printf("\n\n");printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[a].number,work[a].name, work[a].xingbie,work[a].age,work[a].xueli,work[a].wage,work[a].address,work[a].telephone);{printf("sorry,I’m error:\n");exit(0);}for(i=0;i<k;i++){fprintf(fp,"\t%\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",work[i].number,work[i].name,work[ i].xingbie,work[i].age,work[i].xueli,work[i].wage,work[i].address,work[i].telephone);}if(fclose(fp)){printf("sorry,I can not close!!\n");exit(0);}printf("\n是否继续修改(y/n)\n");}if(n==7){printf("请输入新的职工地址:\n");scanf("%s",op);printf("\n");printf("\n");printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[a].number,work[a].name, work[a].xingbie,work[a].age,work[a].xueli,work[a].wage,work[a].address,work[a].telephone);strcpy(work[a].address,op);printf("\n\n");printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[a].number,work[a].name, work[a].xingbie,work[a].age,work[a].xueli,work[a].wage,work[a].address,work[a].telephone);{printf("sorry,I’m error:\n");exit(0);}for(i=0;i<k;i++){fprintf(fp,"\t%\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",work[i].number,work[i].name,work[ i].xingbie,work[i].age,work[i].xueli,work[i].wage,work[i].address,work[i].telephone);}if(fclose(fp)){printf("sorry,I can not close!!\n");exit(0);}printf("\n是否继续修改(y/n)\n");}if(n==8){printf("请输入新的职工联系方式:\n");scanf("%s",op);printf("\n");printf("\n");printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[a].number,work[a].name, work[a].xingbie,work[a].age,work[a].xueli,work[a].wage,work[a].address,work[a].telephone);strcpy(work[a].telephone,op);printf("\n\n");printf("\t%.0f\t%s%3s\t%2d\t%4s\t%4d\t%11s\t%11s\n",work[a].number,work[a].name, work[a].xingbie,work[a].age,work[a].xueli,work[a].wage,work[a].address,work[a].telephone);{printf("sorry,I’m error:\n");exit(0);}for(i=0;i<k;i++){fprintf(fp,"\t%\t%s\t%s\t%d\t%s\t%d\t%s\t%s\n",work[i].number,work[i].name,work[ i].xingbie,work[i].age,work[i].xueli,work[i].wage,work[i].address,work[i].telephone);}if(fclose(fp)){printf("sorry,I can not close!!\n");exit(0);}printf("\n是否继续修改(y/n)\n");}do{c=getchar();if(c=='y'||c=='Y'){shanchu(work);}if(c=='n'||c=='N'){system("cls");mainhome();}}while((c!='y')&&(c!='n')&&(c!='Y')&&(c!='N'));}void left(){char c;system("cls");printf("\n\n");printf("\t┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n"); printf("\t┃************************************************************┃\n"); printf("\t┃* *┃\n"); printf("\t┃* 谢谢使用本程序 *┃\n"); printf("\t┃* *┃\n"); printf("\t┃************************************************************┃\n"); printf("\t┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n\n");printf("\n\n按任意键返回\n");c=getchar();getchar();system("cls");mainhome();}。