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

正文內(nèi)容

c語言實現(xiàn)職工管理系統(tǒng)(編輯修改稿)

2025-05-04 05:22 本頁面
 

【文章內(nèi)容簡介】 \n)。printf(\n)。 for(i=0。i=j1。i++)printf(%5d %10s %4c %4ld %4ld %6s %6s %20s %s\n,sta[i].num,sta[i].name,sta[i].sex,sta[i].byear, sta[i].iyear,sta[i].education,sta[i].duty,sta[i].address,sta[i].phone)。 printf( 【1】返回上一級 【2】退出系統(tǒng)\n)。 printf(請輸入以上數(shù)字,選擇相應(yīng)的功能: )。 switch (getchar()) { case 39。139。:system(cls)。break。 case 39。239。:exit(1)。break。 } }void education(int j) /*按學(xué)歷排序*/{ FILE *fp。 int i。 if((fp=fopen(,r))==NULL) { printf(文件打開錯誤)。 exit(1)。 } for(i=0。iI。i++) /*將文件中的信息按行寫入結(jié)構(gòu)體數(shù)組中 */ { if(sta[i].num==0) /*動態(tài)限制循環(huán)輸出的次數(shù)*/ break。 fscanf(fp,%d %s %c %ld %ld %s %s %s %s\n,amp。sta[i].num,amp。sta[i].name,amp。sta[i].sex,amp。sta[i].byear, amp。sta[i].iyear,amp。sta[i].education,amp。sta[i].duty,amp。sta[i].address,amp。sta[i].phone)。 } fclose(fp)。 getchar()。 printf( 【1】學(xué)歷降序排列 【2】學(xué)歷升序排列\(zhòng)n)。 printf(請輸入以上數(shù)字,選擇相應(yīng)的功能: )。 switch(getchar()) { case 39。139。:descending()。break。 case 39。239。:ascending()。break。 } printf(\n\n按任意鍵返回上一級)。}void del(void) /*刪除職工信息*/{ FILE *fp。 int num,i,j,k。 /*num用于輸入要刪除的職工號, i用于循環(huán)體以及數(shù)組下標(biāo),j記錄職工人數(shù)*/ printf(請輸入要刪除的職工號:)。 scanf(%d,amp。num)。 getchar()。 /*接收回車*/ system(cls)。 if((fp=fopen(,r))==NULL) { printf(文件打開錯誤)。 exit(1)。 } for(i=0。iI。i++) /*將文件中的信息按行寫入結(jié)構(gòu)體數(shù)組中并輸出 */ { fscanf(fp,%d %s %c %ld %ld %s %s %s %s\n,amp。sta[i].num,amp。sta[i].name,amp。sta[i].sex,amp。sta[i].byear, amp。sta[i].iyear,amp。sta[i].education,amp。sta[i].duty,amp。sta[i].address,amp。sta[i].phone)。 if(sta[i].num==0) break。 if(sta[i].num==num) j=i。 } fclose(fp)。 if((fp=fopen(,w))==NULL) /*重新向文件輸入所有信息*/ { printf(文件打開錯誤)。 exit(1)。 } for(k=j。krecord()。k++) sta[k]=sta[k+1]。 for(i=0。irecord()。i++) { sprintf(tempstr,%d,sta[i].num)。 /*將整型數(shù)轉(zhuǎn)化成字符串*/ fputs(tempstr,fp)。 fputs( ,fp)。 fputs(sta[i].name,fp)。 fputs( ,fp)。 fputc(sta[i].sex,fp)。 fputs( ,fp)。 sprintf(tempstr,%ld,sta[i].byear)。 fputs(tempstr,fp)。 fputs( ,fp)。 sprintf(tempstr,%ld,sta[i].iyear)。 fputs(tempstr,fp)。 fputs( ,fp)。 fputs(sta[i].education,fp)。 fputs( ,fp)。 fputs(sta[i].duty,fp)。 fputs( ,fp)。 fputs(sta[i].address,fp)。 fputs( ,fp)。 fputs(sta[i].phone,fp)。 fputc(39。\n39。,fp)。 } fclose(fp)。 }int record(void) /*將文件中的數(shù)據(jù)錄入結(jié)構(gòu)體數(shù)組中*/{ FILE *fp。 int i,j。 /*j用于記錄職工的人數(shù)*/ system(cls)。 if((fp=fopen(,r))==NULL) { printf(文件打開錯誤)。 exit(1)。 } for(i=0,j=0。iI。i++,j++) /*將文件中的信息按行寫入結(jié)構(gòu)體數(shù)組中 */ { fscanf(fp,%d %s %c %ld %ld %s %s %s %s\n,amp。sta[i].num,amp。sta[i].name,amp。sta[i].sex,amp。sta[i].byear, amp。sta[i].iyear,amp。sta[i].education,amp。sta[i].duty,amp。sta[i].address,amp。sta[i].phone)。 if(sta[i].num==0) /
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1