c语言课程设计___职工信息管理系统

上传人:飞*** 文档编号:42073663 上传时间:2018-05-31 格式:DOC 页数:7 大小:44.50KB
返回 下载 相关 举报
c语言课程设计___职工信息管理系统_第1页
第1页 / 共7页
c语言课程设计___职工信息管理系统_第2页
第2页 / 共7页
c语言课程设计___职工信息管理系统_第3页
第3页 / 共7页
c语言课程设计___职工信息管理系统_第4页
第4页 / 共7页
c语言课程设计___职工信息管理系统_第5页
第5页 / 共7页
点击查看更多>>
资源描述

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

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;

3、/*sex 1- woman 2- 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 fil

4、e of informationn“);exit(0);for(i=0;i100;i+)if(fread(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(fclose(fp); void inputEmpInfo() /*输入信息*/int i,k;for(i=0;i100;i+)printf(“Please enter the staffs :nnumber:

5、“);scanf(“%d“,printf(“nname:“);scanf(“%s“,empi.EmpName);printf(“nsex : 1- woman 2- man:“);scanf(“%d“,printf(“nold:“);scanf(“%d“,printf(“nEducation background:1-specialist 2-doctor 3-others“);scanf(“%d“,printf(“nsalary:“);scanf(“%d“,printf(“naddress:“);scanf(“%s“,empi.Address);printf(“ntellphone:“);s

6、canf(“%d“,printf(“continue?(1.yes 2.no)“);scanf(“%d“,if(k=2) break;close(); void reorder() /*修改*/ int i,s,j,k,l; Emp temp; open(); printf(“nChoose which category would you want to usen1-sex n2- salary(from maximum to minimum) n3-old (from maximum to minimum) n ( enter the corresponding nember) n)“);

7、 scanf(“%d“, switch(i) case 1: printf(“nchoose which sex do you want to inquire? 1-woman 2 -man “); scanf(“%d“, for(j=0;empj.EmpNum!=0;j+)if(empj.Sex=s)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(“ne

8、ducation 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:for(k=0;empk.EmpNum!=0;j+ )for(l=k;empl.EmpNum!=0;l+)if(empl.Salaryempl+1.Salary)temp=empl;empl=empl+1;e

9、mpl+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-doctor 3-others “,empk.Cult);printf(“nsalary:%d“,empk.Salary);printf(“nadress:%s“,empk.Address);printf(

10、“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); printf(“name:%s“,empk.EmpName); printf(“nsex 1- woman 2- man:%d“,empk.Sex); printf(“nold:%d“,empk.Old); p

11、rintf(“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(); printf(“n-informations of sraffs- -n“); for(j=0;empj.EmpNum!=0;j+)printf(“

12、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);printf(“nadress:%s“,empj.Address);printf(“ntelephone nember :%d“

13、,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“,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 staffs informations manage systerm has no date of the number your entere

14、d!n“);close();printf(“succeeed to deleten“); void findByEmpName() /*查询*/ int j,i,k=0; open(); printf(“Please enter the number :n“); scanf(“%d“, for(j=0;empj.EmpNum!=0;j+)if(empj.EmpNum=i) printf(“n-information of your want - -n“);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:%dtttt 1-specialist 2-doctor 3-others “,empj.Cult);printf(“nsalary:%d“,empj.Salary);printf(“nadress:%s“,empj.Address);pr

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 商业/管理/HR > 其它文档

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