c語言 學(xué)生管理系統(tǒng) 不雷同

上傳人:沈*** 文檔編號(hào):155494336 上傳時(shí)間:2022-09-23 格式:DOC 頁(yè)數(shù):17 大?。?01.50KB
收藏 版權(quán)申訴 舉報(bào) 下載
c語言 學(xué)生管理系統(tǒng) 不雷同_第1頁(yè)
第1頁(yè) / 共17頁(yè)
c語言 學(xué)生管理系統(tǒng) 不雷同_第2頁(yè)
第2頁(yè) / 共17頁(yè)
c語言 學(xué)生管理系統(tǒng) 不雷同_第3頁(yè)
第3頁(yè) / 共17頁(yè)

下載文檔到電腦,查找使用更方便

10 積分

下載資源

還剩頁(yè)未讀,繼續(xù)閱讀

資源描述:

《c語言 學(xué)生管理系統(tǒng) 不雷同》由會(huì)員分享,可在線閱讀,更多相關(guān)《c語言 學(xué)生管理系統(tǒng) 不雷同(17頁(yè)珍藏版)》請(qǐng)?jiān)谘b配圖網(wǎng)上搜索。

1、 #include"stdio.h" /*學(xué)生成績(jī)管理系統(tǒng)*/ #include"string.h" #include"stdlib.h" #include"conio.h" /*函數(shù) getch() 所需頭文件*/ int m,n; FILE *fr; char fname[81]; struct ke /*建立科目結(jié)構(gòu)體*/ { int dianfen; /*電路分析*/ int gaoshu; /*高等數(shù)學(xué)*/ int yingyu; /*大學(xué)英語*/ int dawu; /*大學(xué)物理*/ }; struct student

2、/*建立學(xué)生結(jié)構(gòu)體*/ { long num; /*學(xué)號(hào)*/ char name[21]; /*姓名*/ char xibie[21]; /*系別*/ char banji[21]; /*班級(jí)*/ struct ke kemu; /*科目*/ int zongfen; /*總分*/ }*s; void find(); /*函數(shù)說明*/ void menu(); /*函數(shù)說明*/ void xpm(); /*函數(shù)說明*/ void bpm(); /*函數(shù)說明*/ void xifen(); /*函數(shù)說明*/

3、 void paim(); /*函數(shù)說明*/ void xi() /*按系查詢*/ {int i,j=0;char k[21]; clrscr(); printf("Please enter the Department to query:");/*請(qǐng)輸入所要查詢的系*/ scanf("%s",k); printf("%10s%10s%10s%10s%8s%7s%7s%7s%10s\n","xuehao","xingming","xibie","banji","dianfen","gaoshu","yingyu","dawu","zongfen"); for(

4、i=0;i

5、intf("Press any key to continue.\n"); getch(); find(); } void banji() /*按班級(jí)查詢*/ { int i,j=0;char k[21]; clrscr(); printf("Please enter the class to query:"); /*請(qǐng)輸入所要查詢的班級(jí)*/ scanf("%s",k); printf("%10s%10s%10s%10s%8s%7s%7s%7s%10s\n","xuehao","xingming","xibie","banji","dianfen","g

6、aoshu","yingyu","dawu","zongfen"); for(i=0;i

7、ass %s has %d student.\n",k,j); printf("Press any key to continue.\n"); getch(); find(); } void df() /*查詢電路分析成績(jī)*/ { int i,j,t,k;int p[20]; clrscr(); for(i=0;i

8、;i++) /*索引排序*/ for(j=0;j

9、.\n"); getch(); find(); } void gs() /*查詢高等數(shù)學(xué)成績(jī)*/ { int i,j,t,k;int p[20]; clrscr(); for(i=0;i

10、p[j+1]].kemu.gaoshu) {t=p[j];p[j]=p[j+1];p[j+1]=t;} for(k=0;k

11、j,t,k;int p[20]; clrscr(); for(i=0;i

12、;k

13、 printf("%10s%10s%10s%10s%10s\n","xuehao","xingming","xibie","banji","dawu"); for(i=1;i

14、[k]].xibie,s[p[k]].banji,s[p[k]].kemu.dawu);} printf("Press any key to continue.\n"); getch(); find(); } void kemu() /*按科目查詢*/ {clrscr(); printf("\t\t\t*****----------*****\n"); printf("\t\t\t*** 1:Dian fen ***\n"); printf("\t\t\t*** 2:Gao shu ***\n"); printf("\t\t\t*** 3

15、:Ying yu ***\n"); printf("\t\t\t*** 4:Da wu ***\n"); printf("\t\t\t*** 0:Return ***\n"); printf("\t\t\t*****----------*****\n"); printf("Please enter your choice(0-4):"); scanf("%d",&m); switch(m) {case 0:find();break; case 1:df();break; case 2:gs();break; case

16、 3:yy();break; case 4:dw();break; default:printf("Input error!\n");printf("Press any key to continue.\n");getch();kemu(); } } void xueh() /*修改學(xué)號(hào)*/ {int i;char k[20]; clrscr(); printf("Input the student's name:"); scanf("%s",k); for(i=0;i

17、 { printf("Ipnut the xuehao:"); scanf("%ld",&s[i].num); } } void xingm() /*修改姓名*/ {int i;char k[20]; clrscr(); printf("Input the student's name:"); scanf("%s",k); for(i=0;i

18、 } void xib() /*修改系別*/ {int i;char k[20]; clrscr(); printf("Input the student's name:"); scanf("%s",k); for(i=0;i

19、nput the student's name:"); scanf("%s",k); for(i=0;i

20、 if(strcmp(k,s[i].name)==0) { printf("Ipnut the dian fen cheng ji:"); scanf("%d",&s[i].kemu.dianfen); } } void gaos()/*修改高等數(shù)學(xué)成績(jī)*/ {int i;char k[20]; clrscr(); printf("Input the student's name:"); scanf("%s",k); for(i=0;i

21、("Ipnut the gao shu cheng ji:"); scanf("%d",&s[i].kemu.gaoshu); } } void yingy()/*修改大學(xué)英語成績(jī)*/ {int i;char k[20]; clrscr(); printf("Input the student's name:"); scanf("%s",k); for(i=0;i

22、",&s[i].kemu.yingyu); } } void daw()/*修改大學(xué)物理成績(jī)*/ {int i;char k[20]; clrscr(); printf("Input the student's name:"); scanf("%s",k); for(i=0;i

23、生信息*/ {char k[20],p[20]="abcd"; clrscr(); printf("Input the password:"); scanf("%s",k); if(strcmp(k,p)==0) {clrscr(); printf("\t\t*****-------------------------*****\n"); printf("\t\t*** 1:Modified xuehao ***\n"); /*修改學(xué)號(hào)*/ printf("\t\t*** 2:Modified xingming **

24、*\n"); /*修改姓名*/ printf("\t\t*** 3:Modified xibie ***\n"); /*修改系別*/ printf("\t\t*** 4:Modified banji ***\n"); /*修改班級(jí)*/ printf("\t\t*** 5:Modified dianfen score ***\n"); /*修改電路分析成績(jī)*/ printf("\t\t*** 6:Modified gaoshu score ***\n"); /*修改高等數(shù)學(xué)成績(jī)*/ printf("

25、\t\t*** 7:Modified yingyu score ***\n"); /*修改大學(xué)英語成績(jī)*/ printf("\t\t*** 8:Modified dawu score ***\n"); /*修改大學(xué)物理成績(jī)*/ printf("\t\t*** 0:Return ***\n"); /*回到主菜單*/ printf("\t\t*****-------------------------*****\n"); printf("Please enter your choice(0-4):");

26、scanf("%d",&m); switch(m) {case 0:break; case 1:xueh();break; case 2:xingm();break; case 3:xib();break; case 4:banj();break; case 5:dianf();break; case 6:gaos();break; case 7:yingy();break; case 8:daw();break; default:printf("Input error!\n");printf("Press a

27、ny key to continue.\n");getch();xiugai(); } }find(); } void find() /*查詢菜單*/ {clrscr(); printf("\t\t*****-----------------------------*****\n"); printf("\t\t*** 1:Inquiries by the Department ***\n"); /*按系查詢*/ printf("\t\t*** 2:Inquiries by the class ***\n"); /*按班級(jí)查詢*/ pri

28、ntf("\t\t*** 3:Inquiries by the subject ***\n"); /*按科目查詢*/ printf("\t\t*** 4:Modify the basic information ***\n"); /*基本信息修改*/ printf("\t\t*** 0:Back to main menu ***\n"); /*回到主菜單*/ printf("\t\t*****-----------------------------*****\n"); printf("Please enter your choice(

29、0-4):"); scanf("%d",&m); switch(m) {case 0:menu();break; case 1:xi();break; case 2:banji();break; case 3:kemu();break; case 4:xiugai();break; default:printf("Input error!\n");printf("Press any key to continue.\n");getch();find(); } } void xipj() /*按系查詢(求單科平均成績(jī)、及格率和

30、優(yōu)秀率)*/ {double a=0,j=0,k=0,l=0; int i;char f[21]; clrscr(); printf("Please enter the Department to query:");/*請(qǐng)輸入所要查詢的系*/ scanf("%s",f); for(i=0;i=60) k++; if(s[i].kemu.dianfen

31、>=90) l++; } } if(j==0) {printf("Input error!\n");printf("Press any key to continue.\n");getch();} else {printf("The Department:%s\nThe dianfen average score is:%5.1lf jigelv:%.1lf%% youxiulv:%.1lf%%\n",f,a/j,k*100/j,l*100/j); a=0;k=0;l=0; for(i=0;i

32、mp(f,s[i].xibie)==0) { a+=s[i].kemu.gaoshu; if(s[i].kemu.gaoshu>=60) k++; if(s[i].kemu.gaoshu>=90) l++; } } printf("The gaoshu average score is:%5.1lf jigelv:%.1lf%% youxiulv:%.1lf%%\n",a/j,k*100/j,l*100/j); a=0;k=0;l=0; for(i=0;i

33、[i].xibie)==0) { a+=s[i].kemu.yingyu; if(s[i].kemu.yingyu>=60) k++; if(s[i].kemu.yingyu>=90) l++; } } printf("The yingyu average score is:%5.1lf jigelv:%.1lf%% youxiulv:%.1lf%%\n",a/j,k*100/j,l*100/j); a=0;k=0;l=0; for(i=0;i

34、ibie)==0) { a+=s[i].kemu.dawu; if(s[i].kemu.dawu>=60) k++; if(s[i].kemu.dawu>=90) l++; } } printf("The dawu average score is:%5.1lf jigelv:%.1lf%% youxiulv:%.1lf%%\n",a/j,k*100/j,l*100/j); printf("Press any key to continue.\n"); getch(); } xifen(); } vo

35、id banpj() /*按班級(jí)查詢(求單科平均成績(jī)、及格率和優(yōu)秀率)*/ {double a=0,j=0,k=0,l=0; int i;char f[21]; clrscr(); printf("Please enter the Class to query:");/*請(qǐng)輸入所要查詢的系*/ scanf("%s",f); for(i=0;i=60) k+

36、+; if(s[i].kemu.dianfen>=90) l++; } } if(j==0) {printf("Input error!\n");printf("Press any key to continue.\n");getch();} else {printf("The class:%s\nThe dianfen average scores is:%5.1lf jigelv:%.1lf%% youxiulv:%.1lf%%\n",f,a/j,k*100/j,l*100/j); a=0;k=0;l=0; for(i=0;i<

37、n;i++) { if(strcmp(f,s[i].banji)==0) { a+=s[i].kemu.gaoshu; if(s[i].kemu.gaoshu>=60) k++; if(s[i].kemu.gaoshu>=90) l++; } } printf("The gaoshu average scores is:%5.1lf jigelv:%.1lf%% youxiulv:%.1lf%%\n",a/j,k*100/j,l*100/j); a=0;k=0;l=0; for(i=0;i

38、 { if(strcmp(f,s[i].banji)==0) { a+=s[i].kemu.yingyu; if(s[i].kemu.yingyu>=60) k++; if(s[i].kemu.yingyu>=90) l++; } } printf("The yingyu average scores is:%5.1lf jigelv:%.1lf%% youxiulv:%.1lf%%\n",a/j,k*100/j,l*100/j); a=0;k=0;l=0; for(i=0;i

39、 if(strcmp(f,s[i].banji)==0) { a+=s[i].kemu.dawu; if(s[i].kemu.dawu>=60) k++; if(s[i].kemu.dawu>=90) l++; } } printf("The dawu average scores is:%5.1lf jigelv:%.1lf%% youxiulv:%.1lf%%\n",a/j,k*100/j,l*100/j); printf("Press any key to continue.\n"); getch(

40、); } xifen(); } void xifen() /* 次菜單 (每系成績(jī)分析:求單科平均成績(jī)、及格率和優(yōu)秀率)*/ {clrscr(); printf("\t*****----------------------------*****\n"); printf("\t*** 1:Inquiries by the Department ***\n");/*按系查詢*/ printf("\t*** 2:Inquiries by the class ***\n");/*按班級(jí)查詢*/ printf("\t*** 0:Back to ma

41、in menu ***\n");/*回到主菜單*/ printf("\t*****----------------------------*****\n"); printf("Please enter your choice(0-2):"); scanf("%d",&m); switch(m) {case 0:menu();break; case 1:xipj();break; case 2:banpj();break; default:printf("Input error!\n");printf("Press any ke

42、y to continue.\n");getch();xifen(); } } void kefen() /*對(duì)所開課程的成績(jī)分析(求其平均成績(jī),最高分和最低分)*/ {int i,k1=0,k2=0;double a=0; clrscr(); for(i=0;i=s[i].kemu.dianfen) k2=i; } printf("*****

43、Dianfen*****\naverage score:%.1lf\n",a/n); printf("highest score:\n"); printf("%ld%10s%10s%10s%6d\n",s[k1].num,s[k1].name,s[k1].xibie,s[k1].banji,s[k1].kemu.dianfen); printf("lowest score:\n"); printf("%ld%10s%10s%10s%6d\n",s[k2].num,s[k2].name,s[k2].xibie,s[k2].banji,s[k2].kemu.dianfen);

44、 /*電路分析的平均成績(jī)和最高低分*/ k1=k2=0;a=0; for(i=0;i=s[i].kemu.gaoshu) k2=i; } printf("*****Gaoshu*****\naverage score:%.1lf\n",a/n); printf("highest score:\n"); printf("%ld%10s%10s%

45、10s%6d\n",s[k1].num,s[k1].name,s[k1].xibie,s[k1].banji,s[k1].kemu.gaoshu); printf("lowest score:\n"); printf("%ld%10s%10s%10s%6d\n",s[k2].num,s[k2].name,s[k2].xibie,s[k2].banji,s[k2].kemu.gaoshu); /*高等數(shù)學(xué)的平均成績(jī)和最高低分*/ printf("Press any key to continue.\n"); getch(); clrscr(); k1=k2=

46、0;a=0; for(i=0;i=s[i].kemu.yingyu) k2=i; } printf("*****Yingyu*****\naverage score:%.1lf\n",a/n); printf("highest score:\n"); printf("%ld%10s%10s%10s%6d\n",s[k1].num,s[k1].name

47、,s[k1].xibie,s[k1].banji,s[k1].kemu.yingyu); printf("lowest score:\n"); printf("%ld%10s%10s%10s%6d\n",s[k2].num,s[k2].name,s[k2].xibie,s[k2].banji,s[k2].kemu.yingyu); /*大學(xué)英語的平均成績(jī)和最高低分*/ k1=k2=0;a=0; for(i=0;i

48、f(s[k2].kemu.dawu>=s[i].kemu.dawu) k2=i; } printf("*****Dawu*****\naverage score:%.1lf\n",a/n); printf("highest score:\n"); printf("%ld%10s%10s%10s%6d\n",s[k1].num,s[k1].name,s[k1].xibie,s[k1].banji,s[k1].kemu.dawu); printf("lowest score:\n"); printf("%ld%10s%10s%10s%6d\n",s[k2].num

49、,s[k2].name,s[k2].xibie,s[k2].banji,s[k2].kemu.dawu); /*大學(xué)物理的平均成績(jī)和最高低分*/ printf("Press any key to continue.\n"); getch(); menu(); } void xipm() /*按系單科排名*/ { int i,j,t,a,k=0;int p[20]; char q[20]; clrscr(); printf("Please enter the Department to query:"); /*請(qǐng)輸入所要查詢的系*/ scanf(

50、"%s",q); /*電路分析科排名*/ printf("***%s xi Dian fen dan ke pai ming ***\n",q); for(i=0;i

51、+1]=t;} printf("%10s%10s %8s %8s%8s\n","xuehao","xingming","xibie","banji","dianfen"); for(a=0;a

52、rscr(); /*高等數(shù)學(xué)科排名*/ printf("***%s xi Gao shu dan ke pai ming ***\n",q); for(i=1;i

53、u"); for(a=0;a

54、;i++) /*索引排序*/ for(j=0;j

55、e,s[p[a]].xibie,s[p[a]].banji,s[p[a]].kemu.yingyu);} printf("Press any key to continue.\n"); getch(); clrscr(); /*大學(xué)物理科排名*/ printf("***%s xi Da wu dan ke pai ming ***\n",q); for(i=1;i

56、 {t=p[j];p[j]=p[j+1];p[j+1]=t;} printf("%10s%10s %8s %8s%8s\n","xuehao","xingming","xibie","banji","dawu"); for(a=0;a

57、 getch(); paim(); } void banpm() /*按每班總成績(jī)排名*/ {int i,j,t,k=0;int p[30]; char q[20]; clrscr(); printf("Please enter the class to query:\n"); /*請(qǐng)輸入所要查詢的班級(jí)*/ scanf("%s",q); for(i=0;i

58、) /*索引排序*/ for(j=0;j

59、s%10s%10s%8d%8d%8d%8d%10d\n",s[p[k]].num,s[p[k]].name,s[p[k]].xibie,s[p[k]].banji,s[p[k]].kemu.dianfen,s[p[k]].kemu.gaoshu,s[p[k]].kemu.yingyu,s[p[k]].kemu.dawu,s[p[k]].zongfen);} printf("Press any key to continue.\n"); getch(); paim(); } void paim() /*學(xué)生考試成績(jī)排名菜單*/ {clrscr(); print

60、f("\t*****---------------------------------------------------*****\n"); printf("\t*** 1:Billing Division of the rankings by the Department ***\n"); /*按系單科排名*/ printf("\t*** 2:Ranked by total score of the class ***\n"); /*按班總成績(jī)排名*/ printf("\t*** 0:Back to main menu

61、 ***\n"); /*回到主菜單*/ printf("\t*****---------------------------------------------------*****\n"); printf("Please enter your choice(0-2):"); scanf("%d",&m); switch(m) {case 0:menu();break; case 1:xipm();break; case 2:banpm();break; default:printf("Input er

62、ror!\n");printf("Press any key to continue.\n");getch();paim(); } } void save() {int i; fr=fopen(fname,"w"); for(i=0;i

63、; fprintf(fr,"\n"); } fcloseall(); } void menu() /*主菜單*/ {clrscr(); printf("\t*****---------------------main menu---------------------*****\n"); printf("\t*** 1:Basic information inquiries ***\n"); /*基本信息的查詢*/ printf("\t*** 2:Department of subjects

64、 for each analysis of results ***\n"); /*對(duì)系各科成績(jī)的分析*/ printf("\t*** 3:The analysis to the performance of each course ***\n"); /*對(duì)所開課程的成績(jī)分析*/ printf("\t*** 4:Test scores of students to rank ***\n"); /*對(duì)學(xué)生考試成績(jī)進(jìn)行排名*/ printf("\t*** 0:Exit the process

65、 ***\n"); /*退出程序*/ printf("\t*****----------------------------------------------------*****\n\n"); printf("Please enter your choice(0-4):"); scanf("%d",&m); switch(m) {case 0:save();free((void *)s);printf("Press any key to continue.\n");getch();break; case 1:fin

66、d();break; case 2:xifen();break; case 3:kefen();break; case 4:paim();break; default:printf("Input error!\n");printf("Press any key to continue.\n");getch();menu(); } } void input() {int i; printf("Input the number of the student(<=the number of students in the file):"); /*輸入學(xué)生人數(shù)*/ scanf("%d",&n); printf("xuehao xingming xibie banji dianfen gaoshu yingyu dawu\n"); s=(struct student *)malloc(n*sizeof(struct student)); /*建立n個(gè)學(xué)生成員*/ for(i=0;i

展開閱讀全文
溫馨提示:
1: 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
2: 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
3.本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(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ì)自己和他人造成任何形式的傷害或損失。

相關(guān)資源

更多
正為您匹配相似的精品文檔
關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  zhuangpeitu.com 裝配圖網(wǎng)版權(quán)所有   聯(lián)系電話:18123376007

備案號(hào):ICP2024067431號(hào)-1 川公網(wǎng)安備51140202000466號(hào)


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務(wù)平臺(tái),本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請(qǐng)立即通知裝配圖網(wǎng),我們立即給予刪除!

五月丁香婷婷狠狠色,亚洲日韩欧美精品久久久不卡,欧美日韩国产黄片三级,手机在线观看成人国产亚洲