




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、學(xué)生成績管理系統(tǒng)源代碼。學(xué)生成績管理系統(tǒng)源代碼。學(xué)生成績管理系統(tǒng)源代碼。學(xué)生成績管理系統(tǒng)源代碼。編制僅供參考審核批準(zhǔn)生效日期地址: 電話:傳真: 郵編:#include #include #include #include struct studentchar no9;char name20;int score4;float aver;float sum;void menu()o);printf(tt請輸入姓名:);scanf(%s,);printf(tt請輸入語文成績:);scanf(%d,&stui.score0);printf(tt請輸入數(shù)學(xué)成績:);scanf(%d,
2、&stui.score1);printf(tt請輸入英語成績:);scanf(%d,&stui.score2);printf(tt請輸入C語言成績:);scanf(%d,&stui.score3);printf(tt繼續(xù)錄入請輸入1,終止錄入請輸入0:);scanf(%d,&k);i+;(*n)+;for(a=0;ai;a+) um=0;stua.aver=0;for(a=0;ai;a+)um+=stua.scoreb;for(a=0;ai;a+)ver=stua.sum/4;system(pause);void dele(struct student *stu,int *n)o,number
3、)=0 & strcmp(,name)=0)for(;i(*n-1);i+)stui=stui+1; (*n)-;break;printf(tt刪除成功!);void search(struct student *stu,int n)o,number)=0 & strcmp(,name)=0 )printf(t-成績單-n); printf(n); printf(t| 學(xué)號 | 姓名 | 語文 | 數(shù)學(xué) | 英語 | C語言 | 總分 | 平均分 |n); printf(t| %-5s | %-6s | %-4d| %-4d| %-4d| %-4d| % |
4、 % |n, stui.no,,stui.score0,stui.score1,stui.score2,stui.score3,stui.sum,stui.aver);a=0;elseprintf(tt輸入有誤,請重新輸入!n);break;system(pause);void modify(struct student *stu,int n)o,number)=0) printf(n);printf(t-成績單-n); printf(n); printf(t| 學(xué)號 | 姓名 | 語文 | 數(shù)學(xué) | 英語 | C語言 | 總分 | 平均分 |n);printf(t| %-5
5、s | %-6s | %-4d| %-4d| %-4d| %-4d| % | % |n, stui.no,,stui.score0,stui.score1,stui.score2,stui.score3,stui.sum,stui.aver);printf(tt請輸入新的學(xué)號:); scanf(%s,stui.no);printf(tt請輸入新的姓名:); scanf(%s,);printf(tt請輸入新的語文成績:); scanf(%d,&stui.score0); printf(tt請輸入新的數(shù)學(xué)成績:); scanf(%d,&stui.score1);
6、 printf(tt請輸入新的英語成績:); scanf(%d,&stui.score2); printf(tt請輸入新的C語言成績:); scanf(%d,&stui.score3);m-;b=i;if(a=0)printf(tt請輸入您要修改同學(xué)的姓名:); scanf(%s,name);for(i=0;in;i+)if(strcmp(,name)=0) printf(n);printf(t-成績單-n); printf(n); printf(t| 學(xué)號 | 姓名 | 語文 | 數(shù)學(xué) | 英語 | C語言 | 總分 | 平均分 |n);printf(t| %-5s | %
7、-6s | %-4d| %-4d| %-4d| %-4d| % | % |n, stui.no,,stui.score0,stui.score1,stui.score2,stui.score3,stui.sum,stui.aver); printf(tt請輸入新的學(xué)號:); scanf(%s,stui.no);printf(tt請輸入新的姓名:); scanf(%s,);printf(tt請輸入新的語文成績:); scanf(%d,&stui.score0); printf(tt請輸入新的數(shù)學(xué)成績:); scanf(%d,&stui.score1); pri
8、ntf(tt請輸入新的英語成績:); scanf(%d,&stui.score2); printf(tt請輸入新的C語言成績:); scanf(%d,&stui.score3);m-;b=i;while(m);printf(tt該同學(xué)修改后的成績?yōu)椋簄);printf(t-成績單-n); printf(n); printf(t| 學(xué)號 | 姓名 | 語文 | 數(shù)學(xué) | 英語 | C語言 | 總分 | 平均分 |n);printf(t| %-5s | %-6s | %-4d| %-4d| %-4d| %-4d| % | % |n, stub.no,,stub.score0,st
9、ub.score1,stub.score2,stub.score3,stub.sum,stub.aver);system(pause);void insert(struct student *stu,int *n)core060)a+;for(i=0;in;i+)core160)b+;for(i=0;in;i+)core260)c+;for(i=0;in;i+)core360)a+;for(i=0;in;i+)core10)k=stuj;stuj=stuj+1;stuj+1=k;printf(tt140705班學(xué)生成績n);printf(-成績單-n);printf(n);printf(| 學(xué)
10、號 | 姓名 | 語文 | 數(shù)學(xué) | 英語 | C語言 | 總分 | 平均分 |n);for(i=0;in;i+)printf(| %-5s | %-6s | %-4d| %-4d| %-4d| %-4d| % | % |n, stui.no,,stui.score0,stui.score1,stui.score2,stui.score3,stui.sum,stui.aver);printf(n);printf(-n);system(pause);return;if(a=0)for(i=0;in-1;i+)for(j=0;jn-i;j+)if(stuj.sumstuj+1.s
11、um)k=stuj;stuj=stuj+1;stuj+1=k;printf(140705班學(xué)生成績n);printf(-成績單-n);printf(n);printf(| 學(xué)號 | 姓名 | 語文 | 數(shù)學(xué) | 英語 | C語言 | 總分 | 平均分 | 名 次 |n);for(i=0;ican not open file!n); exit(0);while(!feof(fp) if(fread(stu+i,sizeof(struct student),1,fp)=1)/一次從文件讀取一條學(xué)生成績記錄 i+;*n=i;fclose(fp);/關(guān)閉文件void main()/登錄界面system
12、(cls);struct student stu100;struct student *p;int n=0;system(color 0B);char a10=140705,b10=123456;char c10,d10;int h=5; read(stu,&n);printf(tt*歡迎進(jìn)入學(xué)生成績管理系統(tǒng)!*n);printf(n);printf(n);printf(tttt 用戶登錄n);printf(tt請輸入用戶名:);scanf(%s,c);printf(tt請輸入密碼:);scanf(%s,d);if(strcmp(a,c)=0 & strcmp(b,d)=0)f(stu,n);elseh-; while(h)printf(
溫馨提示
- 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)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 促進(jìn)自主創(chuàng)新與合作計劃
- 培養(yǎng)幼兒觀察能力的探索計劃
- 2025年無菌包裝用包裝材料項目建議書
- 制定戰(zhàn)略合作伙伴關(guān)系計劃
- 可視化工作計劃的應(yīng)用案例
- 2025年酶法生產(chǎn)海藻糖項目建議書
- 2025年分級設(shè)備地礦勘測設(shè)備:鉆探機項目建議書
- 2025年漲緊輪項目合作計劃書
- 2025年面板檢測系統(tǒng)合作協(xié)議書
- 2025年酶標(biāo)記制劑項目發(fā)展計劃
- GB/T 5782-2016六角頭螺栓
- GB/T 20169-2006離子型稀土礦混合稀土氧化物
- GB/T 18290.5-2015無焊連接第5部分:壓入式連接一般要求、試驗方法和使用導(dǎo)則
- 中建某公司技術(shù)質(zhì)量工作會講稿總工
- Visio圖標(biāo)最全網(wǎng)絡(luò)通信圖標(biāo)庫(可用于VISIO等)課件
- 婦產(chǎn)科正常分娩課件
- 馬工程西方經(jīng)濟(jì)學(xué)(第二版)教學(xué)課件-8
- 六年級下冊信息技術(shù)教學(xué)計劃
- 沉井施工方案
- 民法典侵權(quán)責(zé)任編課件
- 產(chǎn)業(yè)鏈鏈長分工表
評論
0/150
提交評論