C語言課程設(shè)計(jì)教師工資管理系統(tǒng)職工工資管理系統(tǒng)_第1頁
C語言課程設(shè)計(jì)教師工資管理系統(tǒng)職工工資管理系統(tǒng)_第2頁
C語言課程設(shè)計(jì)教師工資管理系統(tǒng)職工工資管理系統(tǒng)_第3頁
免費(fèi)預(yù)覽已結(jié)束,剩余16頁可下載查看

下載本文檔

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

文檔簡介

1、課程設(shè)計(jì)教師工資管理系統(tǒng)運(yùn)行平臺:VC6.0(其他平臺未經(jīng)測試,不一定保證有效)制作者:弓箭中南大學(xué)信息科學(xué)與工程學(xué)院源代碼如下:#include<stdio.h>#include<stdlib.h>#include<string.h>#include<conio.h>#defineLENsizeof(structteacher)structteacherintnum;charname20;charsex20;charworkplace50;charaddress50;longphone;doublede_salary;doublede_jint

2、ie;doublede_shenghuobutie;doubleyingfa_salary;doublecost_phone;doublecost_water_elec;doublecost_rent;doublecost_tax;doublecost_weisheng;doublecost_gongjijin;doublecost_all;doubleshifa_salary;structteacher*next;讀取函數(shù)*/*structteacher*load()structteacher*p1,*p2,*head;FILE*fp;inti=1;if(fp=fopen("sav

3、e","rb")=NULL)printf("return(NULL);文件不存在!按下任意鍵返回主菜單.");getch();)else(head=NULL;p1=(structteacher*)malloc(LEN);while(fread(p1,LEN-4,1,fp)=1)(if(i=1)(head=p1;p2=p1;i=2;)else(p2->next=p1;p2=p2->next;)p1=(structteacher*)malloc(LEN);)p2->next=NULL;free(p1);fclose(fp);ret

4、urn(head);)/*歡迎菜單函數(shù)*/voidwelcome()(printf("nnnprintf("printf("printf("printf(">>>>>歡迎使用教師工資管理系統(tǒng)Beta1.2<<<<<n");*5)C語言課程設(shè)計(jì)教師工資管理系統(tǒng)姓名:弓箭*n");*n");printf("nngetch();*5)按下任意鍵進(jìn)入系統(tǒng).");system("cls");/*制作人員名單*/voidlist

5、()(system("cls");>>>>>版權(quán)所有侵權(quán)必究<<<<<n");printf("nnnn");*printf("*學(xué)校(College):軟件名稱(Software):版中南大學(xué)CentralSouthUniversity教師工資管理系統(tǒng)Teacher'sSalaryManagingSystem本號(Edition):*n");*n");Beta1.2printf("*printf("*n");print

6、f("*制作人(Producer):弓箭James*n");printf("*printf("*所在班級(Class):所在學(xué)院(Institute)電氣信息類1001班ElectricInformation1001:信息科學(xué)與工程學(xué)院InformationEngineeringInstitute*n");*n");printf("*n");>>>>>ILLEGALCOPYBANNED<<<<<n");按下任意鍵返回主菜單.");菜單函

7、數(shù)*1printf("printf("nngetch();/*intmenu()inti;printf("nnn>>>>>歡迎使用教師工資管理系統(tǒng)Beta1.2<<<<<n");printf("*5)printf("*1.輸入教師信息*n");printf("*2.插入教師信息*n");printf("*3.修改教師信息*n");printf("*4.刪除教師信息*n");printf("*5.瀏

8、覽教師信息*n");printf("*6.顯小制作人貝書單*n");printf("*7.退出系統(tǒng)*n");printf("*5,);printf("請輸入你想要的操作:");scanf("%d",&i);getchar();returni;voidinput()/*插入函數(shù)*/structteacher*head,*p1,*p2,*p3,*px;inti,t;FILE*fp;chark,n='n',num30,name20;p1=p2=p3=px=(structteac

9、her*)malloc(LEN);if(head=load()!=NULL)don='n'printf(-請輸入要插入的教師信息:n");printf("n");printf("請輸入教工號:");gets(num);px->num=atoi(num);printf("請輸入姓名:");gets(px->name);printf("請輸入性別:”);gets(px->sex);printf("請輸入單位名稱:");gets(px->workplace);p

10、rintf("請輸入家庭住址:”);gets(px->address);printf("請輸入聯(lián)系電話:");gets(num);px->phone=atoi(num);printf("請輸入基本工資:");gets(num);px->de_salary=atof(num);printf("請輸入津貝占:");gets(num);px->de_jintie=atof(num);printf("請輸入生活補(bǔ)貼:");gets(num);px->de_shenghuobutie=

11、atof(num);printf("請輸入電話費(fèi):");gets(num);px->cost_phone=atof(num);printf("請輸入水電費(fèi):");gets(num);px->cost_water_elec=atof(num);printf("請輸入房租:");gets(num);px->cost_rent=atof(num);printf("請輸入個(gè)人所得稅:");gets(num);px->cost_tax=atof(num);printf("請輸入衛(wèi)生費(fèi):&qu

12、ot;);gets(num);px->cost_weisheng=atof(num);printf("請輸入公積金:");gets(num);px->cost_gongjijin=atof(num);px->yingfa_salary=px->de_salary+px->de_jintie+px->de_shenghuobutie;px->cost_all=px->cost_phone+px->cost_water_elec+px->cost_rent+px->cost_tax+px->cost_wei

13、sheng+px->cost_gongjijin;px->shifa_salary=px->yingfa_salary-px->cost_all;printf("數(shù)據(jù)輸入完畢,按下任意鍵繼續(xù).”);getch();system("cls");printf("nnn>>>>>>>>>>>插入教師信息<<<<<<<<<<<n");printf("*I11.printf("*1

14、.輸入教師號*n");printf("*2.輸入姓名*n");printf("*3.返回上級菜單*n");printf("*5,);printf("請選擇插入方式:");scanf("%d",&i);getchar();while(i<1|i>3)(printf(-輸入有誤!請重新輸入:");scanf("%d",&i);getchar();)switch(i)(case1:printf("請輸入要插入在哪條數(shù)據(jù)后面:"

15、;);scanf("%d",&t);getchar();p1=head;while(p1->num!=t)(if(p1->next!=NULL)(p1=p1->next;else(printf(-查找不到相關(guān)數(shù)據(jù)!n");break;if(p1->num=t)(printf("printf("教工號要插入的信息如下:n");家庭住址姓名性別單位名稱聯(lián)系電話n");printf("%-4d%-13s%s%-19s%-19s%-14ldn",px->num,px->

16、name,px->sex,px->workplace,px->address,px->phone);printf("電話費(fèi)水電費(fèi)房租個(gè)人所得稅衛(wèi)生費(fèi)公積金合計(jì)扣款n");printf("%-10.1lf%-10.1lf%-10.1lf%-10.1lf%-10.1lf%-10.1lf%-10.1lfn",px->cost_phone,px->cost_water_elec,px->cost_rent,px->cost_tax,px->cost_weisheng,px->cost_gongjijin

17、,px->cost_all);printf(-基本工資津貼生活補(bǔ)貼應(yīng)發(fā)工資實(shí)發(fā)工資n");printf("%-13.1lf%-13.1lf%-13.1lf%-13.1lf%-13.1lfn",px->de_salary,px->de_jintie,px->de_shenghuobutie,px->yingfa_salary,px->shifa_salary);printf("n");printf("確定插入嗎?(y或n):");scanf("%c",&k);ge

18、tchar();if(k='y'|k='Y')(if(p1->num=t)(if(p1=head)/*如果插入點(diǎn)為頭指針*/(p3=p1->next;p1->next=px;px->next=p3;p2=head;)elseif(p1->next=NULL)/*如果插入點(diǎn)為末尾指針*/(p3=p1;p1=head;p2=head;while(p1->next!=p3)(p1=p1->next;)p1=p1->next;p1->next=px;px->next=NULL;)else(/*如果插入點(diǎn)為中間指

19、針*/p3=p1;p1=head;p2=head;while(p1->next!=p3)(p1=p1->next;)p1=p1->next;p3=p1->next;px->next=p3;p1->next=px;)if(fp=fopen("save","wb")=NULL)(printf("文件不存在!按下任意鍵返回主菜單.”);getch();)else(do(fwrite(p2,LEN-4,1,fp);if(p2->next!=NULL)p2=p2->next;while(p2->nex

20、t!=NULL);if(p2!=head)fwrite(p2,LEN-4,1,fp);fclose(fp);printf("插入成功!按下任意鍵繼續(xù).");getch();else(printf("插入已被取消!按下任意鍵繼續(xù).");getch();break;case2:printf("請輸入要插入的教師姓名:");gets(name);p1=head;while(strcmp(p1->name),name)!=0)(if(p1->next!=NULL)p1=p1->next;else(printf(-查找不到相關(guān)

21、數(shù)據(jù)!n");break;if(strcmp(p1->name),name)=0)(printf("要插入的信息如下:n");printf("教工號姓名性別單位名稱家庭住址聯(lián)系電話n");printf("%-4d%-13s%s%-19s%-19s%-14ldn”,p1->num,p1->name,p1->sex,p1->workplace,p1->address,p1->phone);printf("電話費(fèi)水電費(fèi)房租個(gè)人所得稅衛(wèi)生費(fèi)公積金合計(jì)扣款n");printf(&qu

22、ot;%-10.1lf%-10.1lf%-10.1lf%-10.1lf%-10.1lf%-10.1lf%-10.1lfn",p1->cost_phone,p1->cost_water_elec,p1->cost_rent,p1->cost_tax,p1->cost_weisheng,p1->cost_gongjijin,p1->cost_all);printf(-基本工資津貼生活補(bǔ)貼應(yīng)發(fā)工資實(shí)發(fā)工資n");printf("%-13.1lf%-13.1lf%-13.1lf%-13.1lf%-13.1lfn",p1-

23、>de_salary,p1->de_jintie,p1->de_shenghuobutie,p1->yingfa_salary,p1->shifa_salary);printf("n");printf("確定插入嗎?(y或n):");scanf("%c",&k);getchar();if(k='y'|k='Y')(if(strcmp(p1->name),name)=0)(if(p1=head)/*如果插入點(diǎn)為頭指針*/(p1->next=px;p2=he

24、ad;elseif(p1->next=NULL)/*如果插入點(diǎn)為末尾指針*/(p3=p1;p1=head;p2=head;while(p1->next!=p3)(p1=p1->next;p1=p1->next;p1->next=px;px->next=NULL;)else(/*如果插入點(diǎn)為中間指針*/p3=p1;p1=head;p2=head;while(p1->next!=p3)(p1=p1->next;)p1=p1->next;p1->next=px;p3=p3->next;px->next=p3;)if(fp=fop

25、en("save","wb")=NULL)(printf("文件不存在!按下任意鍵返回主菜單.”);getch();)else(do(fwrite(p2,LEN-4,1,fp);if(p2->next!=NULL)p2=p2->next;)while(p2->next!=NULL);if(p2!=head)fwrite(p2,LEN-4,1,fp);)fclose(fp);printf("插入成功!按下任意鍵繼續(xù).");getch();)else(printf("插入已被取消!按下任意鍵繼續(xù).&q

26、uot;);getch();)break;case3:break;default:break;)if(i!=3)(printf("n繼續(xù)插入其他教師的信息嗎?(y或n)");scanf("%c",&n);getchar();)while(n='y'|n='Y')&&i!=3);printf("getchar();數(shù)據(jù)插入成功!按下任意鍵返回主菜單.");getch();/*輸入函數(shù)*/voidinsert()(FILE*fp;charm,num30;structteacher*p

27、1;p1=(structteacher*)malloc(LEN);if(fp=fopen("save","ab")=NULL)(文件不存在!按下任意鍵返回主菜單.");getch();printf(")else(printf("do請輸入教師信息:n");(printf("printf("printf("printf("printf("printf("printf("printf("printf("printf("p

28、rintf("printf("printf("printf("printf("printf("n");請輸入教工號:");gets(num);p1->num=atoi(num);請輸入姓名:");gets(p1->name);請輸入性別:");gets(p1->sex);請輸入單位名稱:");gets(p1->workplace);請輸入家庭住址:”);gets(p1->address);請輸入聯(lián)系電話:");gets(num);p1->p

29、hone=atoi(num);請輸入基本工資:");gets(num);p1->de_salary=atof(num);請輸入津貝占:");gets(num);p1->de_jintie=atof(num);請輸入生活補(bǔ)貼:");gets(num);p1->de_shenghuobutie=atof(num);請輸入電話費(fèi):");gets(num);p1->cost_phone=atof(num);請輸入水電費(fèi):");gets(num);p1->cost_water_elec=atof(num);請輸入房租:&qu

30、ot;);gets(num);p1->cost_rent=atof(num);請輸入個(gè)人所得稅:”);gets(num);p1->cost_tax=atof(num);請輸入衛(wèi)生費(fèi):");gets(num);p1->cost_weisheng=atof(num);請輸入公積金:”);gets(num);p1->cost_gongjijin=atof(num);p1->yingfa_salary=p1->de_salary+p1->de_jintie+p1->de_shenghuobutie;p1->cost_all=p1->

31、cost_phone+p1->cost_water_elec+p1->cost_rent+p1->cost_tax+p1->cost_weisheng+p1->cost_gongjijin;p1->shifa_salary=p1->yingfa_salary-p1->cost_all;fwrite(p1,LEN-4,1,fp);printf("輸入下一個(gè)?(y或n)");m=getchar();if(m!='y'&&m!='Y')(printf("數(shù)據(jù)保存成功!按下任意

32、鍵返回主菜單.");getch();)getchar();)while(m='y'|m='Y');)fclose(fp);)/*voidmodify()(structteacher*head,*p1,*p2;inti;修改函數(shù)*/FILE*fp;charm='n',n='n',num230;p1=head=(structteacher*)malloc(LEN);if(head=load()!=NULL)(do(intnum=0;charname20;p1=head;system("cls");prin

33、tf("nnn>>>>>>>>>>>修改教師信息<<<<<<<<<<<n");printf("*I11.printf("*1.輸入教師號*n");printf("*2.輸入姓名*n");printf("*3.返回上級菜單*n");printf("*n");printf("請選擇修改方式:");scanf("%d",&

34、amp;i);getchar();while(i<1|i>3)(printf("輸入有誤!請重新輸入:");scanf("%d",&i);getchar();)switch(i)(case1:printf("請輸入要修改的教師號:");scanf("%d",&num);getchar();while(p1->num!=num)(if(p1->next!=NULL)p1=p1->next;else(printf(-查找不到相關(guān)數(shù)據(jù)!n");break;)if(p

35、1->num=num)(system("cls");printf("nnn>>>>>歡迎使用教師工資管理系統(tǒng)Beta1.2<<<<<n");printf("原信息如下:n");printf("教工號姓名性別單位名稱家庭住址聯(lián)系電話n");printf("%-4d%-13s%s%-19s%-19s%-14ldn”,p1->num,p1->name,p1->sex,p1->workplace,p1->address

36、,p1->phone);printf("電話費(fèi)水電費(fèi)房租個(gè)人所得稅衛(wèi)生費(fèi)公積金合計(jì)扣款n");printf("%-10.1lf%-10.1lf%-10.1lf%-10.1lf%-10.1lf%-10.1lf%-10.1lfn",p1->cost_phone,p1->cost_water_elec,p1->cost_rent,p1->cost_tax,p1->cost_weisheng,p1->cost_gongjijin,p1->cost_all);printf("基本工資工資n");津

37、貼生活補(bǔ)貼應(yīng)發(fā)工資實(shí)發(fā)printf("%-13.1lf%-13.1lf%-13.1lf%-13.1lfobutie,p1->yingfa_salary,p1->shifa_salary);printf("printf("*5)%-13.1lfn",p1->de_salary,p1->de_jintie,p1->de_shenghun");printf("*n");*1.教師號2.姓名printf("*n");*3.性別4.單位名稱printf("*n");

38、*5.家庭住址6.聯(lián)系電話printf("*n");*7.基本工資8.津貼printf("*n");*9.生活補(bǔ)貼10.電話費(fèi)printf("*n");*11.水電費(fèi)12.房租printf("*13.所得稅14.衛(wèi)生費(fèi)*n");printf("*n");*do(printf("請選擇要修改的數(shù)據(jù):");scanf("%d",&i);getchar();while(i>15|i<1)(printf(-輸入有誤!請重新輸入:");

39、scanf("%d",&i);getchar();switch(i)(case1:printf("");gets(num2);p1->num=atoi(num2);break;case2:printf("case3:printf("case4:printf("case5:printf("case6:printf("");gets(num2);p1->phone=atoi(num2);break;case7:printf("");gets(num2);p1-

40、>de_salary=atof(num2);break;case8:printf("");gets(num2);p1->de_jintie=atof(num2);break;case9:printf("");gets(num2);p1->de_shenghuobutie=atof(num2);break;case10:printf("");gets(num2);p1->cost_phone=atof(num2);break;case11:printf("");gets(num2);p1-&g

41、t;cost_water_elec=atof(num2);break;case12:printf("");gets(num2);p1->cost_rent=atof(num2);break;case13:printf("");gets(num2);p1->cost_tax=atof(num2);break;case14:printf("");gets(num2);p1->cost_weisheng=atof(num2);break;case15:printf("");gets(num2);p1-&

42、gt;cost_gongjijin=atof(num2);break;default:break;請輸入新教師號請輸入新姓名:");gets(p1->name);break;請輸入新性別:");gets(p1->sex);break;請輸入新單位名稱:");gets(p1->workplace);break;請輸入新家庭住址:");gets(p1->address);break;請輸入新聯(lián)系電話請輸入新基本工資請輸入新津貼請輸入新生活補(bǔ)貼請輸入新電話費(fèi)請輸入新水電費(fèi)請輸入新房租請輸入新所得稅請輸入新衛(wèi)生費(fèi)請輸入新公積金p1->

43、;yingfa_salary=p1->de_salary+p1->de_jintie+p1->de_shenghuobutie;p1->cost_all=p1->cost_phone+p1->cost_water_elec+p1->cost_rent+p1->cost_tax+p1->cost_weisheng+p1->cost_gongjijin;p1->shifa_salary=p1->yingfa_salary-p1->cost_all;printf("繼續(xù)修改其他數(shù)據(jù)嗎?(y或n):");

44、scanf("%c”,&m);getchar();while(m='y'|m='Y');p2=head;if(fp=fopen("save","wb")=NULL)printf("文件不存在!按下任意鍵返回主菜單.”);getch();elsefwrite(head,LEN-4,1,fp);dop2=p2->next;fwrite(p2,LEN-4,1,fp);while(p2->next!=NULL);printf("修改后數(shù)據(jù)如下:n");printf(&qu

45、ot;教工號姓名性別單位名稱家庭住址聯(lián)系電話n");printf("%-4d%-13s%s%-19s%-19s%-14ldn”,p1->num,p1->name,p1->sex,p1->workplace,p1->address,p1->phone);printf("電話費(fèi)水電費(fèi)房租個(gè)人所得稅衛(wèi)生費(fèi)公積金合計(jì)扣款n");printf("%-10.1lf%-10.1lf%-10.1lf%-10.1lf%-10.1lf%-10.1lf%-10.1lfn",p1->cost_phone,p1->

46、;cost_water_elec,p1->cost_rent,p1->cost_tax,p1->cost_weisheng,p1->cost_gongjijin,p1->cost_all);printf("基本工資津貼生活補(bǔ)貼應(yīng)發(fā)工資實(shí)發(fā)工資n");printf("%-13.1lf%-13.1lf%-13.1lf%-13.1lf%-13.1lfn",p1->de_salary,p1->de_jintie,p1->de_shenghuobutie,p1->yingfa_salary,p1->shi

47、fa_salary);printf("n");fclose(fp);break;case2:printf("請輸入要修改的教師姓名:”);gets(name);while(strcmp(p1->name,name)!=0)if(p1->next!=NULL)p1=p1->next;else(printf(-查找不到相關(guān)數(shù)據(jù)!n");break;)if(strcmp(p1->name,name)=0)(system("cls");printf("nnn>>>>>歡迎使用教師

48、工資管理系統(tǒng)Beta1.2<<<<<n");printf("原信息如下:n");printf("教工號姓名性別單位名稱家庭住址聯(lián)系電話n");printf("%-4d%-13s%s%-19s%-19s%-14ldn”,p1->num,p1->name,p1->sex,p1->workplace,p1->address,p1->phone);printf("電話費(fèi)水電費(fèi)房租個(gè)人所得稅衛(wèi)生費(fèi)公積金合計(jì)扣款n");printf("%-10.1lf

49、%-10.1lf%-10.1lf%-10.1lf%-10.1lf%-10.1lf%-10.1lfn",p1->cost_phone,p1->cost_water_elec,p1->cost_rent,p1->cost_tax,p1->cost_weisheng,p1->cost_gongjijin,p1->cost_all);printf(-基本工資津貼生活補(bǔ)貼應(yīng)發(fā)工資實(shí)發(fā)工資n");printf("%-13.1lf%-13.1lf%-13.1lf%-13.1lf%-13.1lfn",p1->de_sala

50、ry,p1->de_jintie,p1->de_shenghuobutie,p1->yingfa_salary,p1->shifa_salary);printf("n");printf("*5)printf("*1.教師號2.姓名*n");printf("*3.性別4.單位名稱*n");printf("*5.家庭住址6.聯(lián)系電話*n");printf("*7.基本工資8.津貼*n");printf("*9.生活補(bǔ)貼10.電話費(fèi)*n");pri

51、ntf("*11.水電費(fèi)12.房租*n");printf("*13.所得稅14.衛(wèi)生費(fèi)*n");printf("*n");*do(printf("請選擇要修改的數(shù)據(jù):");scanf("%d",&i);getchar();while(i>15|i<1)(printf(-輸入有誤!請重新輸入:");scanf("%d",&i);getchar();switch(i)(case1:printf("");gets(num2)

52、;p1->num=atoi(num2);break;case2:printf("case3:printf("case4:printf("case5:printf("case6:printf("");gets(num2);p1->phone=atoi(num2);break;case7:printf("");gets(num2);p1->de_salary=atof(num2);break;case8:printf("");gets(num2);p1->de_jintie=

53、atof(num2);break;case9:printf("");gets(num2);p1->de_shenghuobutie=atof(num2);break;case10:printf("");gets(num2);p1->cost_phone=atof(num2);break;case11:printf("");gets(num2);p1->cost_water_elec=atof(num2);break;case12:printf("");gets(num2);p1->cost_

54、rent=atof(num2);break;case13:printf("");gets(num2);p1->cost_tax=atof(num2);break;case14:printf("");gets(num2);p1->cost_weisheng=atof(num2);break;case15:printf("");gets(num2);p1->cost_gongjijin=atof(num2);break;default:break;請輸入新教師號請輸入新姓名:");gets(p1->nam

55、e);break;請輸入新性別:");gets(p1->sex);break;請輸入新單位名稱:");gets(p1->workplace);break;請輸入新家庭住址:");gets(p1->address);break;請輸入新聯(lián)系電話請輸入新基本工資請輸入新津貼請輸入新生活補(bǔ)貼請輸入新電話費(fèi)請輸入新水電費(fèi)請輸入新房租請輸入新所得稅請輸入新衛(wèi)生費(fèi)請輸入新公積金p1->yingfa_salary=p1->de_salary+p1->de_jintie+p1->de_shenghuobutie;p1->cost_a

56、ll=p1->cost_phone+p1->cost_water_elec+p1->cost_rent+p1->cost_tax+p1->cost_weisheng+p1->cost_gongjijin;p1->shifa_salary=p1->yingfa_salary-p1->cost_all;printf("繼續(xù)修改其他數(shù)據(jù)嗎?(y或n):");scanf("%c”,&m);getchar();while(m='y'|m='Y');p2=head;if(fp=fop

57、en("save","wb")=NULL)printf("文件不存在!按下任意鍵返回主菜單.”);getch();elsefwrite(head,LEN-4,1,fp);dop2=p2->next;fwrite(p2,LEN-4,1,fp);while(p2->next!=NULL);printf("修改后數(shù)據(jù)如下:n");printf("教工號姓名性別單位名稱家庭住址聯(lián)系電話n");printf("%-4d%-13s%s%-19s%-19s%-14ldn”,p1->num,p

58、1->name,p1->sex,p1->workplace,p1->address,p1->phone);printf("電話費(fèi)水電費(fèi)房租個(gè)人所得稅衛(wèi)生費(fèi)公積金合計(jì)扣款n");printf("%-10.1lf%-10.1lf%-10.1lf%-10.1lf%-10.1lf%-10.1lf%-10.1lfn",p1->cost_phone,p1->cost_water_elec,p1->cost_rent,p1->cost_tax,p1->cost_weisheng,p1->cost_gon

59、gjijin,p1->cost_all);printf("基本工資津貼生活補(bǔ)貼應(yīng)發(fā)工資實(shí)發(fā)工資n");printf("%-13.1lf%-13.1lf%-13.1lf%-13.1lf%-13.1lfn",p1->de_salary,p1->de_jintie,p1->de_shenghuobutie,p1->yingfa_salary,p1->shifa_salary);printf("n");fclose(fp);break;case3:break;default:break;if(i!=3)pr

60、intf("n繼續(xù)修改其他教師的信息嗎?(y或n)");scanf("%c",&n);)while(n='y'|n='Y')&&i!=3);)/*刪除函數(shù)*/voiddeletes()structteacher*head,*p1,*p2,*p3;inti;chark;FILE*fp;charn='n'p1=p2=p3=(structteacher*)malloc(LEN);if(head=load()!=NULL)dointnum;charname20;p1=head;system(

61、"cls");printf("nnn>>>>>>>>>>>刪除教師信息<<<<<<<<<<<n”);printf("*5)printf("*1.輸入教師號*n");printf("*2.輸入姓名*n");printf("*3.返回上級菜單*n");printf("*5)printf("請選擇刪除方式:");scanf("%d&

62、quot;,&i);getchar();while(i<1|i>3)printf(-輸入有誤!請重新輸入:");scanf("%d",&i);getchar();)switch(i)case1:printf("請輸入要刪除的信息的教師號:");scanf("%d",&num);getchar();while(p1->num!=num)(if(p1->next!=NULL)p1=p1->next;else(printf(-查找不到相關(guān)數(shù)據(jù)!n");break;if

63、(p1->num=num)(printf("要刪除的信息如下:n");printf("教工號姓名性別單位名稱家庭住址聯(lián)系電話n");printf("%-4d%-13s%s%-19s%-19s%-14ldn”,p1->num,p1->name,p1->sex,p1->workplace,p1->address,p1->phone);printf("電話費(fèi)水電費(fèi)房租個(gè)人所得稅衛(wèi)生費(fèi)公積金合計(jì)扣款n");printf("%-10.1lf%-10.1lf%-10.1lf%-10.1

64、lf%-10.1lf%-10.1lf%-10.1lfn",p1->cost_phone,p1->cost_water_elec,p1->cost_rent,p1->cost_tax,p1->cost_weisheng,p1->cost_gongjijin,p1->cost_all);printf(-基本工資津貼生活補(bǔ)貼應(yīng)發(fā)工資實(shí)發(fā)工資n");printf("%-13.1lf%-13.1lf%-13.1lf%-13.1lf%-13.1lfn",p1->de_salary,p1->de_jintie,p1

65、->de_shenghuobutie,p1->yingfa_salary,p1->shifa_salary);printf("n");printf("確定刪除嗎?(y或n):");scanf("%c",&k);getchar();if(k='y'|k='Y')(if(p1->num=num)(if(p1=head)(p1=p1->next;p2=p1;elseif(p1->next=NULL)(p3=p1;p1=head;p2=head;while(p1->next!=p3)(p1=p1->next;p1->next=NULL;else(p2=head;p3=p1;p1=head;while(p1->next!=p3)(p1=p1->

溫馨提示

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

最新文檔

評論

0/150

提交評論