freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

c語言職工信息管理系統(tǒng)課程設(shè)計報告-資料下載頁

2025-02-10 07:16本頁面

【導(dǎo)讀】錄入職工信息并保存。職工信息的顯式要求有一定的規(guī)范格式;對職工信息應(yīng)能夠分別按工資及按學(xué)歷兩種方式進行,要求能返回所有符合條件的職工的信息;對職工信息的修改應(yīng)逐個地進行,一個職工信息的更改不應(yīng)影響其他的職工記錄;出書面文檔總體設(shè)計說明書,為下一步進行詳細設(shè)計做準備。工資、住址、電話等;信息瀏覽模塊完成已錄入職工信息的顯示;均需在此模塊中進行選擇并進而調(diào)用其他模塊實現(xiàn)相應(yīng)的功能;止,其間應(yīng)對用戶的選擇做出判斷及異常處理。系統(tǒng)的流程圖如下:。將讀入信息添加到職工信息文件中;提示是否繼續(xù)輸入;如果用戶確定則將中間變量重新寫回到原職工信息文件中;提示并讀入待刪除的職工的職工號;將臨時文件中的內(nèi)容寫入到新信息文件中去;

  

【正文】 。 getchar()。 }while(flag == 1)。 menu()。 } void delete() /* 信息刪除函數(shù) */ { struct Node { char num[10]。 struct Node * next。 }。 int amount。 /* 信息文件中的記錄總數(shù) */ int con=0。 /* 已處理的文件記錄總數(shù) */ struct Node node。 struct Node * head=NULL, * pf=NULL, * pb=NULL。 struct Info info, info_temp。 FILE * fp, *fp1。 /* fp 用于指示信息文件 inform,而 fp1 用于指示臨時文件 */ int total=0。 int offset=0。 /* 文件位置指針偏移量 */ char temp[10], temp1[10]。 int flag=0。 /* 指示是否繼續(xù)進行修改,為 1 時繼續(xù) */ char ID[10]。 /* 待修改的記錄的職工號 */ int ord。 /* 待修改的項目指示 */ int repeat。 /* 在修改中用于重復(fù)的輸入 */ int Yes=0。 /* 指示是否保存修改 */ amount=load()。 if((fp=fopen(,rb)) == NULL) { printf(\tCan not open the inform file!)。 getch()。 exit(1)。 } printf(%5s%8s%8s%11s%10s%8s%8s%12s%8s\n,nun,name,sex ,birthday,education,duty,wage,address,phone)。 for(con=0。 conamount。 con++) { if(fread(amp。info, sizeof(info), 1, fp) != 1) { printf(\nfile read wrong!\n)。 getch()。 exit(1)。 } pb=(struct Node *)malloc(sizeof(struct Node))。 /* 創(chuàng)建包含 num 信息的鏈表,用于后續(xù)的查找 */ strcpy(pbnum,)。 if(total==0) head=pf=pb。 else pfnext=pb。 pbnext=NULL。 pf=pb。 total++。 if(==male) strcpy(temp,male)。 else strcpy(temp,female)。 if(==doctor) strcpy(temp1,doctor)。 else if(==master) strcpy(temp1,master)。 else if(==college) strcpy(temp1,college)。 else if(==junior) strcpy(temp1,junior)。 else strcpy(temp1,high)。 printf(%5s%8s%8s%4d/%2d/%2d%10s%8s%%12s%8s\n,temp,.year,temp1,)。 if((total != 0) amp。amp。 (total%10 ==0)) { printf(\n\n\tPress any key to continue......)。 getch()。 puts(\n\n)。 } } fclose(fp)。 do { printf(Please enter the num that you want to delete:)。 gets(ID)。 pf=head。 while(strcmp(pfnum,ID) amp。amp。 pfnext!=NULL) { pf=pfnext。 offset++。 } if(!strcmp(pfnum,ID)) /* 待刪除的記錄存在 */ { printf(\nAre you sure to delete the record?:\t\t1).Yes\t2).No [ ]\b\b)。 scanf(%d,amp。Yes)。 if(Yes==1) /* 如果確定要刪除該記錄 */ { if((fp=fopen(,rb))==NULL) { printf(\n\nfile open wrong!)。 getch()。 exit(1)。 } if((fp1=fopen(,wb))==NULL) { printf(\n\nfile open wrong!)。 getch()。 exit(1)。 } total=0。 amount=load()。 for(con=0。 conamount。 con++) { if(total==offset1) fseek(fp,(long)sizeof(struct Info),1)。 fread(amp。info, sizeof(struct Info),1,fp)。 fwrite(amp。info, sizeof(struct Info), 1, fp1)。 } fclose(fp1)。 fclose(fp)。 if((fp1=fopen(,rb))==NULL) { printf(\n\nfile open wrong!)。 getch()。 exit(1)。 } if((fp=fopen(,wb))==NULL) { printf(\n\nfile open wrong!)。 getch()。 exit(1)。 } amount=load()。 for(con=0。 conamount。 con++) { fread(amp。info, sizeof(struct Info),1,fp1)。 fwrite(amp。info, sizeof(struct Info), 1, fp)。 } fclose(fp)。 fclose(fp1)。 } } else /* 待刪除的記錄不存在 */ { printf(\n\nThe record you enter is not found!\tany key to continue...)。 getch()。 } printf(\n\nDo you want to continue?:\t\t1).Yes\t2).No [ ]\b\b)。 scanf(%d,amp。flag)。 getchar()。 }while(flag == 1)。 menu()。 } void menu() /*菜單選擇界面 */ { int n, w1。 /* n 記錄選擇的菜單, w1 記錄選擇是否合法 */ do { clrscr()。 /*清屏 */ puts(\t\t\t Wele to employee mangement system )。 puts(\t\t*********************MENU*********************\n\n)。 puts(\t\t\t\ inform)。 puts(\t\t\t\ inform)。 puts(\t\t\t\ inform)。 puts(\t\t\t\ inform)。 puts(\t\t\t\ inform)。 puts(\t\t\t\)。 puts(\n\n\t\t**********************************************\n)。 printf(Choice your number(16): [ ]\b\b)。 scanf(%d,amp。n)。 getchar()。 if(n1||n6) /*對選擇的數(shù)字作判斷 */ {w1=1。getchar()。} else w1=0。 } while(w1==1)。 switch(n) /*菜單選擇功能 */ { case 1:append()。break。 /*信息添加模塊 */ case 2:display()。break。 /*信息顯示模塊 */ case 3:search()。break。 /*信息查詢模塊 */ case 4:modify()。break。 /*信息修改模塊 */ case 5:delete()。break。 /*信息刪除模塊 */ case 6:exit(0)。 /*退出 */ } } main() { menu()。 }
點擊復(fù)制文檔內(nèi)容
法律信息相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1