工资信息管理系统——C语言(共19页).doc
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《工资信息管理系统——C语言(共19页).doc》由会员分享,可在线阅读,更多相关《工资信息管理系统——C语言(共19页).doc(19页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、精选优质文档-倾情为你奉上工资信息管理系统一、题目要求设计工资信息管理系统,要求该系统能够实现工资信息管理。系统包括录入、浏览、查询、统计等功能。其中录入功能要求能够添加新的工资信息到文件,浏览功能要求能按照工资卡号、姓名分类浏览,提供分屏显示;有排序功能,排序后按照工资卡号升序或实发工资降序输出;查询功能要求能够按照工资卡号、姓名查询;统计功能要求能够按照月份累计统计某职工在某时间段实发工资总金额。二、 需求分析根据题目要求,由于工资信息是存放在文件中,所以应提供文件的输入输出等操作;在程序中需要浏览工资信息,应提供显示、查找、排序等操作;另外还应提供键盘式选择彩旦实现功能选择。三、 总体设
2、计工资信息管理系统菜单录入追加查询浏览排序四、 详细设计1主函数 void main() menu();/*主函数只用于调用菜单*/ 2.菜单menu()int n,w1;doputs(tt*MENU*nn);puts(tttt 1.enter data);puts(tttt 2.addition data);puts(tttt 3.browse all);puts(tttt 4.search);puts(tttt 5.order);puts(tttt 6.exit);puts(nntt *n);printf(Choice your number(1-6):bb);scanf(%d,&n);i
3、f(n6)w1=1;getchar();else w1=0;while(w1=1);switch(n)case 1:enter();break;case 2:add();break;case 3:browse();break;case 4:search();break;case 5:order();break;case 6:exit(0);return 1;3.各功能模块设计1)录入模块数据结构struct employerint month;char num11;char name20;float yfgz;float sf;float df;float sj;float sfgz;empN
4、;N为职工人数,在此宏定义为100,#define N 100i从0到n-1调用输入函数input(i)输入用户要输入职工记录的个数n那么此阶段的流程图如下i!=0保存save(n)程序enter()int i,n;printf(How many employers(0-%d)?:,N-1);scanf(%d,&n);printf(n Enter data nownn);for(i=0;in;i+)printf(n input %dth employer record.n,i+1);input(i);if(i!=0) save(n);printf_back();2)追加模块先确定要追加信息的条
5、数,调用n=load()函数,再调用输入函数input(),最后保存追加的记录。整个过的的流程图如下:调用n=load();并计算可以启示录的个数n输入用户要追加学生记录的个数nk=m+ni从n到k调用输入函数input(i)保存追加的记录程序add() int i,n,m,k;FILE *fp;n=load();printf(How many employers are you want to add(0-%d)?:,N-1-n);scanf(%d,&m); k=m+n;for (i=n;ik;i+) printf(n Input %dth employer record.n,i-n+1);
6、input(i);if(fp=fopen(record.txt,ab)=NULL) printf(cannot open filen);for(i=n;ik;i+)if(fwrite(&empi,sizeof(struct employer),1,fp)!=1) printf(file write errorn);fclose(fp);printf_back();3)查询模块下面是流程图:输入查询内容显示找到的记录让用户选择1)查找另一个2)返回菜单返回主菜单提示没有找到是否找到记录询问用户是否继续查找YYN程序search()int i,n,k,w1=1,w2,w3,w4;struct em
7、ployer e;n=load();dodok=1;printf(nnEnter name that you want to search! name:);scanf(%s,e.name);printf_face();for(i=0;in;i+)if(strcmp(e.name,empi.name)=0)k=i;printf_one(k);break;if(k=-1)printf(nnNO exist! please);printf(nnAre you again?nt1).again 2).NO and back bb);scanf(%d,&w1);if(w1=2) break;while(
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 工资 信息管理 系统 语言 19
![提示](https://www.taowenge.com/images/bang_tan.gif)
限制150内