c語言課程設(shè)計(jì)之人事管理系統(tǒng)_第1頁
c語言課程設(shè)計(jì)之人事管理系統(tǒng)_第2頁
c語言課程設(shè)計(jì)之人事管理系統(tǒng)_第3頁
c語言課程設(shè)計(jì)之人事管理系統(tǒng)_第4頁
c語言課程設(shè)計(jì)之人事管理系統(tǒng)_第5頁
已閱讀5頁,還剩29頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、 本科生C語言課程設(shè)計(jì)論文課程名稱 C語言課程設(shè)計(jì) 教師姓名 朱莉 本科生姓名 李百蟬 本科生學(xué)號(hào) 20111002986 本科生專業(yè) 地質(zhì)學(xué) 所在院系 地球科學(xué)學(xué)院 日 期: 20一三年12月26日 目 錄目 錄21.課程論文題目32.程序設(shè)計(jì)思路33.功能模塊圖44.程序代碼45.程序運(yùn)行結(jié)果306.課程設(shè)計(jì)總結(jié)327.致謝328.參考文獻(xiàn)32 一 課程論文題目某高校主要人員有:在職人員(行政人員、教師、一般員工)、退休人員和臨時(shí)工?,F(xiàn)在,需要存儲(chǔ)這些人員的人事檔案信息:編號(hào)、姓名、性別、年齡、職務(wù)、職稱、政治面貌、最高學(xué)歷、任職時(shí)間、來院時(shí)間、人員類別。其中,人員編號(hào)唯一,不能重復(fù)。(1

2、) 添加刪除功能:能根據(jù)學(xué)院人事的變動(dòng)情況,添加刪除記錄;(2) 查詢功能:能根據(jù)編號(hào)和姓名進(jìn)行查詢;(3) 編輯功能(高級(jí)):根據(jù)查詢對(duì)相應(yīng)的記錄進(jìn)行修改,并存儲(chǔ);(4) 統(tǒng)計(jì)功能:能根據(jù)多種參數(shù)進(jìn)行人員的統(tǒng)計(jì)(在職人數(shù)、黨員人數(shù)、女工人數(shù)、高學(xué)歷高職稱人數(shù)(碩士學(xué)位以上或者副教授以上),統(tǒng)計(jì)要求同時(shí)顯示被統(tǒng)計(jì)者的信息;(5) 排序功能:按照年齡、來院時(shí)間進(jìn)行排序;(6) 保存功能:能對(duì)輸入的數(shù)據(jù)進(jìn)行相應(yīng)的存儲(chǔ);二 程序設(shè)計(jì)思路根據(jù)題目要求,人事信息是存放在文件中的,所以應(yīng)該提供相應(yīng)的文件的輸入輸出的功能,在程序中應(yīng)該有添加刪除,查詢,編輯,統(tǒng)計(jì),排序,保存等程序?qū)崿F(xiàn)相應(yīng)的操作,另外菜單式的

3、選擇方式選擇程序的功能也是必須需的。另外程序中要求存儲(chǔ)的模塊,采用的方式均為將原文件中的所有數(shù)據(jù)讀入內(nèi)存,在內(nèi)存中處理之后以覆蓋的方式寫入文件中重新儲(chǔ)存,這樣的方法容易理解、容易編寫,但當(dāng)文件中的數(shù)據(jù)量很大時(shí),這種方法也存在一定的難度,在本程序中將M定為2000,也即最多可儲(chǔ)存的職工人數(shù)為2000;根據(jù)以上需求分析,將程序分成以下幾個(gè)模塊: 1.添加和刪除 *添加人員信息并保存(1) *按名稱和編號(hào)查詢與刪除記錄并保存(2) 2.查詢與編輯 *按名稱和編號(hào)查詢 *重新編輯信息并保存 3. 統(tǒng)計(jì) *統(tǒng)計(jì)在職人數(shù) *統(tǒng)計(jì)黨員人數(shù) *統(tǒng)計(jì)女工人數(shù) *統(tǒng)計(jì)碩士以上學(xué)歷和副教授以上職稱人數(shù) *將統(tǒng)計(jì)得到

4、的信息保存在worker3.txt文件中 4. 排序 *按年齡進(jìn)行排序(1) *按來院時(shí)間進(jìn)行排序(2) 三 功能模塊圖四 程序代碼1、 主函數(shù):主函數(shù)設(shè)計(jì)的比較簡(jiǎn)單,只提供輸入、處理和輸出部分的函數(shù)調(diào)用。其中各功能模塊用菜單方式選擇。其流程圖如下程序開始顯示一系列功能根據(jù)n的值調(diào)用個(gè)功能模塊函數(shù)結(jié)束輸入n,判斷是否是04NYmain()int n,w;doputs("tt*高校人事管理*nnn");puts("tttt 1.添加或刪除n"); puts("tttt 2.查詢與編輯n");puts("tttt 3.統(tǒng)計(jì)n&q

5、uot;);puts("tttt 4.排序n");puts("tttt 5.退出n");puts("tt*n");printf("選擇你要的服務(wù)(1-5): bb");scanf("%d",&n);if(n<1|n>5)w=1;getchar();else w=0;while(w=1);switch(n)case 1:retify();main();break;case 2:sear_edit();main();break;case 3:stat();main();break

6、;case 4:row();main();break; case 5:exit(0);break;struct workerint num;char name20;char sex10;int old;char zhicheng20;char zhiwei20;char mianmao20;char xueli20;int come_time;int work_time;int leibie;worN;1.添加與刪除模塊,此模塊有(1),(2)兩個(gè)模塊構(gòu)成。void retify()int n,w;doputs("tt*刪除或添加人員的信息*nnnnn");puts(&qu

7、ot;tttt 1.添加"); puts("tttt 2.刪除");printf("請(qǐng)選擇服務(wù)(1-2): bb");scanf("%d",&n);if(n<1|n>2)w=1;getchar();else w=0;while(w=1);switch(n)case 1:tianjia();break;case 2:shanchu();break;(1).添加模塊:開始輸入你要添加人的信息并且顯示在屏幕中對(duì)原文件進(jìn)行添加并保存void tianjia()FILE *fp;int i,number;struc

8、t worker wor_tN;printf("您要添加的人的人數(shù):");scanf("%d",&number); printf("輸入添加人的信息:n");for(i=0;i<number;i+)printf("編號(hào):n");scanf("%d",&wor_ti.num);printf("姓名:n");scanf("%s",wor_);printf("性別:n");scanf("%s&qu

9、ot;,wor_ti.sex);printf("年齡:n");scanf("%d",&wor_ti.old);printf("職稱:n");scanf("%s",wor_ti.zhicheng);printf("職位:n");scanf("%s",wor_ti.zhiwei);printf("政治面貌:n");scanf("%s",wor_ti.mianmao);printf("學(xué)歷:n");scanf(&q

10、uot;%s",wor_ti.xueli);printf("來院時(shí)間:n");scanf("%d",&wor_tixe_time); printf("在院工作時(shí)間:n");scanf("%d",&wor_ti.work_time);printf("在職與否:在職請(qǐng)按1,不在職請(qǐng)按2n");scanf("%d",&wor_ti.leibie);printf("您剛才輸入的人的信息n");printf("%d %s

11、%s %d %s %s %s %s %d %d %d n",wor_ti.num,wor_,wor_ti.sex,wor_ti.old,wor_ti.zhicheng,wor_ti.zhiwei,wor_ti.mianmao,wor_ti.xueli,wor_tixe_time,wor_ti.work_time,wor_ti.leibie);if(fp=fopen("D:txtworker.txt","a+")=NULL) printf("nCannot open filen");exit(0);for(i=0

12、;i<number;i+)fprintf(fp,"n%d %s %s %d %s %s %s %s %d %d %d",wor_ti.num,wor_,wor_ti.sex,wor_ti.old,wor_ti.zhicheng,wor_ti.zhiwei,wor_ti.mianmao,wor_ti.xueli,wor_tixe_time,wor_ti.work_time,wor_ti.leibie);fclose(fp);(2).刪除模塊該模塊的功能是根據(jù)編號(hào)和姓名先查詢出該人的信息,然后從原文件中刪除該人的信息。流程圖如下,開始輸入要?jiǎng)h除記錄的編號(hào)和姓

13、名該人存在與否?顯示:該人在?刪除原文件中該人的信息并且保存YN程序void shanchu()FILE *fp,*fp1;int i,number,k,j,m;struct worker worker1M,worker2M;int aN;char bN20;printf("您要?jiǎng)h除的人的人數(shù):n");scanf("%d",&number);for(i=0;i<number;i+)printf("輸入刪除人的信息的編號(hào)和姓名:n");printf("輸入刪除人的編號(hào):n");scanf("%

14、d",&ai);printf("輸入刪除人的姓名:n");scanf("%s",bi);printf("您剛才輸入的人的信息的編號(hào)和姓名:n");printf("%d %sn",ai,bi);if(fp=fopen("worker.txt","r")=NULL) printf("nCannot open filen");getch();exit(0);for(i=0;!feof(fp);i+)fscanf(fp,"%d %s %

15、s %d %s %s %s %s %d %d %dn",&worker2i.num,,worker2i.sex,&worker2i.old,worker2i.zhicheng,worker2i.zhiwei,worker2i.mianmao,worker2i.xueli,&worker2ixe_time,&worker2i.work_time,&worker2i.leibie);k=i;m=0;for(i=0;i<k;i+)for(j=0;j<number;j+)if(worker2i.num=aj|!st

16、rcmp(,bj)break; if(j=number)worker1m=worker2i,m+;printf("輸出公司更改后所有人員的信息:n編號(hào) 姓名 性別 年齡 職稱 職位 面貌 學(xué)歷 來院時(shí)間 工作時(shí)間 在職與否n");if(fp1=fopen("worker.txt","w")=NULL) printf("nCannot open filen");getch();exit(0);for(i=0;i<m;i+) printf(" %d %s %s %d %s %s

17、 %s %s %d %d %dn",worker1i.num,,worker1i.sex,worker1i.old,worker1i.zhicheng,worker1i.zhiwei,worker1i.mianmao,worker1i.xueli,worker1ixe_time,worker1i.work_time,worker1i.leibie);fprintf(fp1," %d %s %s %d %s %s %s %s %d %d %dn",worker1i.num,,worker1i.sex,worker1

18、i.old,worker1i.zhicheng,worker1i.zhiwei,worker1i.mianmao,worker1i.xueli,worker1ixe_time,worker1i.work_time,worker1i.leibie);fclose(fp1);getch();2,查詢和編輯功能:首先,輸入你要查詢的人的編號(hào)和姓名,電腦將顯示出該人的信息,并提問你是否要對(duì)該人的信息重新進(jìn)行編輯,若選擇了重新編輯的選項(xiàng)就重新輸入該人的信息,此時(shí)將顯示該人的信息并且對(duì)原文件進(jìn)行修改和保存。開始輸入你要查詢?nèi)说木幪?hào)和姓名顯示該人的信息是否重新編輯該信息?該人是否存在?顯示該人不存在重新輸入

19、該人的信息顯示你剛才輸入的信息,并且保存到原文件里void sear_edit()FILE *fp,*fp1;struct worker wor_people ,worker1M;int i,k,m,n;printf("你想查詢誰?n");printf("輸入你想查詢的人的編號(hào)和姓名 n");printf("輸入你想查詢的人的編號(hào) n");scanf("%d",&wor_people.num);printf("輸入你想查詢的人的姓名 n");scanf("%s",wo

20、r_);if(fp=fopen("worker.txt","r")=0) printf("nCannot open filen");getch();exit(0);for(i=0;!feof(fp);i+)fscanf(fp,"%d %s %s %d %s %s %s %s %d %d %d",&worker1i.num,,worker1i.sex,&worker1i.old,worker1i.zhicheng,worker1i.zhiwei,work

21、er1i.mianmao,worker1i.xueli,&worker1ixe_time,&worker1i.work_time,&worker1i.leibie);k=i;m=-1;for(i=0;i<k;i+)if(wor_people.num=worker1i.num|!(strcmp(wor_,)printf("%d %s %s %d %s %s %s %s %d %d %d",worker1i.num,,worker1i.sex,worker1i.old,wor

22、ker1i.zhicheng,worker1i.zhiwei,worker1i.mianmao,worker1i.xueli,worker1ixe_time,worker1i.work_time,worker1i.leibie);m=i;fclose(fp);if(m=-1) printf("n這個(gè)人不存在?");exit(0);getch();printf("n你想重新編輯這個(gè)人的信息嗎?n ");printf("如果你想,請(qǐng)按 1n如果不想請(qǐng)按 2n");scanf("%d",&n);if(n=1)pr

23、intf("這個(gè)人的初始信息:n");printf("n%d %s %s %d %s %s %s %s %d %d %dn",worker1m.num,,worker1m.sex,worker1m.old,worker1m.zhicheng,worker1m.zhiwei,worker1m.mianmao,worker1m.xueli,worker1mxe_time,worker1m.work_time,worker1m.leibie);printf(" 輸入新的信息n");printf("編號(hào):n

24、");scanf("%d",&worker1m.num);printf("姓名:n");scanf("%s",);printf("性別:n");scanf("%s",worker1m.sex);printf("年齡:n");scanf("%d",&worker1m.old);printf("職稱:n");scanf("%s",worker1m.zhicheng);p

25、rintf("職位:n");scanf("%s",worker1m.zhiwei);printf("政治面貌:n");scanf("%s",worker1m.mianmao);printf("學(xué)歷:n");scanf("%s",worker1m.xueli);printf("來院時(shí)間:n");scanf("%d",&worker1mxe_time);printf("在院工作時(shí)間:n");scanf("

26、;%d",&worker1m.work_time);printf("在職與否:在職請(qǐng)按1,不在職請(qǐng)按2n");scanf("%d",&worker1i.leibie);printf("您剛才輸入的人的信息n");printf("n%d %s %s %d %s %s %s %s %d %d %dn",worker1m.num,,worker1m.sex,worker1m.old,worker1m.zhicheng,worker1m.zhiwei,worker1m.m

27、ianmao,worker1m.xueli,worker1mxe_time,worker1m.work_time,worker1m.leibie);if(fp1=fopen("worker.txt","w")=0) printf("nCannot open filen");exit(0);for(i=0;i<k;i+)fprintf(fp1,"%d %s %s %d %s %s %s %s %d %d %dn",worker1i.num,,worker1i.sex,worker1i.

28、old,worker1i.zhicheng,worker1i.zhiwei,worker1i.mianmao,worker1i.xueli,worker1ixe_time,worker1i.work_time,worker1i.leibie);fclose(fp1);3,根據(jù)各個(gè)參數(shù)進(jìn)行統(tǒng)計(jì):*統(tǒng)計(jì)在職人數(shù)*統(tǒng)計(jì)黨員人數(shù)*統(tǒng)計(jì)女工人數(shù)*統(tǒng)計(jì)碩士以上學(xué)歷和副教授以上職稱人數(shù)*將統(tǒng)計(jì)得到的信息保存在worker3.txt文件中void stat() FILE *fp,*fp1;int w_num,d_num,wo_num,x_c_num,i,k;struct worker worker1M;put

29、s("tt*統(tǒng)計(jì)人數(shù)菜單*nn");printf("tttt 各種人員的人數(shù)"); puts("nntt*n");if(fp=fopen("worker.txt","r")=0) printf("nCannot open filen");exit(0);for(i=0;!feof(fp);i+)fscanf(fp,"%d %s %s %d %s %s %s %s %d %d %d",&worker1i.num,,worke

30、r1i.sex,&worker1i.old,worker1i.zhicheng,worker1i.zhiwei,worker1i.mianmao,worker1i.xueli,&worker1ixe_time,&worker1i.work_time,&worker1i.leibie);k=i;fclose(fp);w_num=0,d_num=0,wo_num=0,x_c_num=0;printf("女職工人數(shù)n");for(i=0;i<k;i+)if(!(strcmp(worker1i.sex,"w") w_num+

31、, printf("%d %s %s %d %s %s %s %s %d %d %dn",worker1i.num,,worker1i.sex,worker1i.old,worker1i.zhicheng,worker1i.zhiwei,worker1i.mianmao,worker1i.xueli,worker1ixe_time,worker1i.work_time,worker1i.leibie);printf("女職工人數(shù)有%d人n",w_num); printf("黨員人數(shù)n"); for(i=0;i

32、<k;i+) if(!(strcmp(worker1i.mianmao,"dang") d_num+, printf("%d %s %s %d %s %s %s %s %d %d %dn",worker1i.num,,worker1i.sex,worker1i.old,worker1i.zhicheng,worker1i.zhiwei,worker1i.mianmao,worker1i.xueli,worker1ixe_time,worker1i.work_time,worker1i.leibie);printf(&quo

33、t;黨員人數(shù)有%d人n",d_num); printf("在職人員n");for(i=0;i<k;i+)if(worker1i.leibie=1) wo_num+, printf("%d %s %s %d %s %s %s %s %d %d %dn",worker1i.num,,worker1i.sex,worker1i.old,worker1i.zhicheng,worker1i.zhiwei,worker1i.mianmao,worker1i.xueli,worker1ixe_time,worker1i.wo

34、rk_time,worker1i.leibie);printf("在職人員有%d人n",wo_num); printf("高職稱高學(xué)歷人數(shù)n");for(i=0;i<k;i+) if(!(strcmp(worker1i.xueli,"doc") x_c_num+; printf("%d %s %s %d %s %s %s %s %d %d %dn",worker1i.num,,worker1i.sex,worker1i.old,worker1i.zhicheng,worker1i.z

35、hiwei,worker1i.mianmao,worker1i.xueli,worker1ixe_time,worker1i.work_time,worker1i.leibie); continue;if(!(strcmp(worker1i.xueli,"mas") x_c_num+; printf("%d %s %s %d %s %s %s %s %d %d %dn",worker1i.num,,worker1i.sex,worker1i.old,worker1i.zhicheng,worker1i.zhiwei,worker

36、1i.mianmao,worker1i.xueli,worker1ixe_time,worker1i.work_time,worker1i.leibie); continue;if(!(strcmp(worker1i.zhicheng,"Professor") x_c_num+; printf("%d %s %s %d %s %s %s %s %d %d %dn",worker1i.num,,worker1i.sex,worker1i.old,worker1i.zhicheng,worker1i.zhiwei,worker1i.

37、mianmao,worker1i.xueli,worker1ixe_time,worker1i.work_time,worker1i.leibie); continue;if(!(strcmp(worker1i.zhicheng,"a_professor") x_c_num+; printf("%d %s %s %d %s %s %s %s %d %d %dn",worker1i.num,,worker1i.sex,worker1i.old,worker1i.zhicheng,worker1i.zhiwei,worker1i.m

38、ianmao,worker1i.xueli,worker1ixe_time,worker1i.work_time,worker1i.leibie); continue; printf("高職稱高學(xué)歷人數(shù)有%d人n",x_c_num);if(fp1=fopen("worker3.txt","w")=NULL) printf("nCannot open filen");exit(0);fprintf(fp1,"%d %d %d %d ",w_num,d_num,wo_num,x_c_num);fcl

39、ose(fp1);4.排序模塊:該模塊有兩個(gè)子模塊構(gòu)成,按年齡和來源時(shí)間對(duì)原文件里的信息進(jìn)行排序并且將排序分別保存在old_row.txt和comingtime_row.txt中。開始選擇你要進(jìn)行排序的參數(shù)選擇1就按年齡進(jìn)行排序選擇2就按來院時(shí)間進(jìn)行排序顯示按相應(yīng)參數(shù)進(jìn)行排序的結(jié)果并且分別保存在相應(yīng)的 文件夾里void row() int n, w;doputs("tt*按年齡和來院時(shí)間排序*nn");puts("tttt 1.按年齡排序n"); puts("tttt 2.按來院時(shí)間排序n");puts("nntt*n&qu

40、ot;);printf(" 選擇數(shù)字后就可排序(1-2): bb");scanf("%d",&n);if(n<1|n>2)w=1;getchar();else w=0;while(w=1);switch(n)case 1:old_row();break;case 2:comingtime_row();break;(1).按年齡對(duì)人員進(jìn)行排序:void old_row()FILE *fp,*fp1;struct worker wor_people ,worker1M;int i,j,k;if(fp=fopen("worker.

41、txt","r")=NULL) printf("nCannot open filen");exit(0);for(i=0;!feof(fp);i+)fscanf(fp,"%d %s %s %d %s %s %s %s %d %d %dn",&worker1i.num,,worker1i.sex,&worker1i.old,worker1i.zhicheng,worker1i.zhiwei,worker1i.mianmao,worker1i.xueli,&worker1ixe_

42、time,&worker1i.work_time,&worker1i.leibie);k=i;for(i=0;i<k;i+)for(j=i+1;j<k;j+)if(worker1i.old>worker1j.old)wor_people=worker1i;worker1i=worker1j;worker1j=wor_people;if(fp1=fopen("old_row.txt","w")=0) printf("nCannot open filen");for(i=0;i<k;i+)print

43、f("%d %s %s %d %s %s %s %s %d %d %dn",worker1i.num,,worker1i.sex,worker1i.old,worker1i.zhicheng,worker1i.zhiwei,worker1i.mianmao,worker1i.xueli,worker1ixe_time,worker1i.work_time,worker1i.leibie); fprintf(fp1,"%d %s %s %d %s %s %s %s %d %d %dn",worker1i.num,worker1i.

44、name,worker1i.sex,worker1i.old,worker1i.zhicheng,worker1i.zhiwei,worker1i.mianmao,worker1i.xueli,worker1ixe_time,worker1i.work_time,worker1i.leibie);fclose(fp1);(2).按來院時(shí)間對(duì)人員進(jìn)行排序void comingtime_row()FILE *fp,*fp1;struct worker wor_people ,worker1M;int i,j,k;if(fp=fopen("worker.txt","r&

45、quot;)=NULL) printf("nCannot open filen");exit(0);for(i=0;!feof(fp);i+)fscanf(fp,"%d %s %s %d %s %s %s %s %d %d %dn",&worker1i.num,,worker1i.sex,&worker1i.old,worker1i.zhicheng,worker1i.zhiwei,worker1i.mianmao,worker1i.xueli,&worker1ixe_time,&worker1i

46、.work_time,&worker1i.leibie);k=i;for(i=0;i<k;i+)for(j=i+1;j<k;j+)if(worker1i.work_time>worker1j.work_time)wor_people=worker1i;worker1i=worker1j;worker1j=wor_people;if(fp1=fopen("comingtime_row.txt","w")=0) printf("nCannot open filen");for(i=0;i<k;i+)fpri

47、ntf(fp1,"%d %s %s %d %s %s %s %s %d %d %dn",worker1i.num,,worker1i.sex,worker1i.old,worker1i.zhicheng,worker1i.zhiwei,worker1i.mianmao,worker1i.xueli,worker1ixe_time,worker1i.work_time,worker1i.leibie);printf("%d %s %s %d %s %s %s %s %d %d %dn",worker1i.num,worker1i.

48、name,worker1i.sex,worker1i.old,worker1i.zhicheng,worker1i.zhiwei,worker1i.mianmao,worker1i.xueli,worker1ixe_time,worker1i.work_time,worker1i.leibie);fclose(fp1);各模塊匯總構(gòu)成總程序并且各功能運(yùn)行過程如下:# include<stdio.h># include<stdlib.h># include<string.h># include<conio.h># define M 2000# de

49、fine N 20void retify();void sear_edit();void tianjia();void shanchu();void row();void stat();void old_row();void comingtime_row();main()int n,w;doputs("tt*高校人事管理*nnn");puts("tttt 1.添加或刪除n"); puts("tttt 2.查詢與編輯n");puts("tttt 3.統(tǒng)計(jì)n");puts("tttt 4.排序n")

50、;puts("tttt 5.退出n");puts("tt*n");printf("選擇你要的服務(wù)(1-5): bb");scanf("%d",&n);if(n<1|n>5)w=1;getchar();else w=0;while(w=1);switch(n)case 1:retify();main();break;case 2:sear_edit();main();break;case 3:stat();main();break;case 4:row();main();break; case 5

51、:exit(0);break;struct workerint num;char name20;char sex10;int old;char zhicheng20;char zhiwei20;char mianmao20;char xueli20;int come_time;int work_time;int leibie;worN;void retify()int n,w;doputs("tt*刪除或添加人員的信息*nnnnn");puts("tttt 1.添加"); puts("tttt 2.刪除");printf("

52、請(qǐng)選擇服務(wù)(1-2): bb");scanf("%d",&n);if(n<1|n>2)w=1;getchar();else w=0;while(w=1);switch(n)case 1:tianjia();break;case 2:shanchu();break;void tianjia()FILE *fp;int i,number;struct worker wor_tN;printf("您要添加的人的人數(shù):");scanf("%d",&number); printf("輸入添加人的信

53、息:n");for(i=0;i<number;i+)printf("編號(hào):n");scanf("%d",&wor_ti.num);printf("姓名:n");scanf("%s",wor_);printf("性別:n");scanf("%s",wor_ti.sex);printf("年齡:n");scanf("%d",&wor_ti.old);printf("職稱:n"

54、);scanf("%s",wor_ti.zhicheng);printf("職位:n");scanf("%s",wor_ti.zhiwei);printf("政治面貌:n");scanf("%s",wor_ti.mianmao);printf("學(xué)歷:n");scanf("%s",wor_ti.xueli);printf("來院時(shí)間:n");scanf("%d",&wor_tixe_time); printf("在院工作時(shí)間:n");scanf("%d",&wor_ti.work_time);printf("在職與否:在職請(qǐng)按1,不在職請(qǐng)按2n");scanf("%d",&wor_ti.leibie)

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論