![2022年C語言大作業(yè)-學(xué)生成績管理系統(tǒng)v2.0_第1頁](http://file4.renrendoc.com/view/4431383e722b761bdc64d7d55722d9d4/4431383e722b761bdc64d7d55722d9d41.gif)
![2022年C語言大作業(yè)-學(xué)生成績管理系統(tǒng)v2.0_第2頁](http://file4.renrendoc.com/view/4431383e722b761bdc64d7d55722d9d4/4431383e722b761bdc64d7d55722d9d42.gif)
![2022年C語言大作業(yè)-學(xué)生成績管理系統(tǒng)v2.0_第3頁](http://file4.renrendoc.com/view/4431383e722b761bdc64d7d55722d9d4/4431383e722b761bdc64d7d55722d9d43.gif)
![2022年C語言大作業(yè)-學(xué)生成績管理系統(tǒng)v2.0_第4頁](http://file4.renrendoc.com/view/4431383e722b761bdc64d7d55722d9d4/4431383e722b761bdc64d7d55722d9d44.gif)
![2022年C語言大作業(yè)-學(xué)生成績管理系統(tǒng)v2.0_第5頁](http://file4.renrendoc.com/view/4431383e722b761bdc64d7d55722d9d4/4431383e722b761bdc64d7d55722d9d45.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、/成績管理系統(tǒng)v2.0#include #include #define N 30void Input (long num,int score,int n);void Totalave (int score,int n);void Scoredes (long num,int score,int n,int (*compare)(int a,int b);int Ascending (int a,int b);void Numas (long num,int score,int n);void Search (long num,int score,int n,int x);void stati
2、stis (long num,int score,int n);void List (long num,int score,int n);int main() int n,scoreN,c,x,i; long numN; printf(輸入學(xué)生人數(shù)); scanf(%d,&n); printf(1.Input recordn); printf(2.Caculate totel and average score of coursen); printf(3.Sort in descending order by scoren); printf(4.Sort in ascending order
3、by numbern); printf(5.Search by numbern); printf(6.Statistic analysisn); printf(7.List recordn); printf(0.Exitn); printf(Please enter your choice:n); printf(n); for(;) scanf(%d,&c); switch(c) case 1: Input (num,score,n); printf(Please enter your choice:n); break; case 2: Totalave (score,n); printf(P
4、lease enter your choice:n); break; case 3: Scoredes (num,score,n,Ascending); for(i=0;in;i+) printf(ID:%10ld,score:%dn,numi,scorei);/以長整形打印用%ld printf(Please enter your choice:n); break; case 4: Numas (num,score,n); printf(Please enter your choice:n); break; case 5: printf(請輸入查找學(xué)號n); scanf(%d,&x); Se
5、arch (num,score,n,x); printf(Please enter your choice:n); break; case 6: statistis (num,score,n); printf(Please enter your choice:n); break; case 7: List (num,score,n); Totalave (score,n); printf(Please enter your choice:n); break; case 0: exit(0); return 0;void Input (long num,int score,int n) int
6、i; for(i=0;in;i+) printf(Input students ID and score); scanf(%ld%d,&numi,&scorei); void Totalave (int score,int n) int i,sum=0; double ave; for(i=0;in;i+) sum=sum+scorei; ave=(double)sum/n; printf(Caculate total=%d,average score of course=%fn,sum,ave);void Scoredes (long num,int score,int n,int(*com
7、pare)(int a,int b) int i,j,k,t,h; for(i=0;in;i+) k=i; for(j=i+1;jn;j+) if (*compare)(scorej,scorek) k=j; if(i!=k) t=scorek,h=numk; scorek=scorei,numk=numi; scorei=t,numi=h; int Ascending (int a,int b) return ab;void Numas (long num,int score,int n) int i,j,k,t,h; for(i=0;in;i+) k=i; for(j=i+1;jn;j+)
8、 if (numjnumk) k=j; if(i!=k) t=scorek,h=numk; scorek=scorei,numk=numi; scorei=t,numi=h; for(i=0;in;i+) printf(ID:%10ld,score:%dn,numi,scorei);/以長整形打印用%ldvoid Search (long num,int score,int n,int x) int high=n-1,low=0,mid,c=0,pos,find=0,i,j,k,t,h; for(i=0;in;i+) k=i; for(j=i+1;jn;j+) if (numjnumk) k=
9、j; if(i!=k) t=scorek,h=numk; scorek=scorei,numk=numi; scorei=t,numi=h; while(find=0&lownummid) low=mid+1; else if(xnummid) high=mid-1; else pos=mid; find=1; if(find=0) printf(not findn); else for(i=0;iscorepos) c+; printf(ID:%10ld,order:%d,score:%dn,numpos,c+1,scorepos); void statistis (long num,int
10、 score,int n) int a=0,b=0,c=0,d=0,e=0,i; double A,B,C,D,E; for(i=0;i=90) a+; else if(scorei=80) b+; else if(scorei=70) c+; else if(scorei=60) d+; else e+; A=(double)a/n*100; B=(double)b/n*100; C=(double)c/n*100; D=(double)d/n*100; E=(double)e/n*100; printf(優(yōu)秀人數(shù)%d,比例:%f%n,a,A); printf(良好人數(shù)%d,比例:%f%n,b,B); printf(中檔人數(shù)%d,比例:%f%n,c
溫馨提示
- 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)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 種植土覆土綠化施工方案
- 《2025年度水電站施工合同履行監(jiān)督及審計(jì)合同》3篇
- 金華海洋館設(shè)計(jì)施工方案
- 二零二五年度離婚訴訟代理與調(diào)解合同3篇
- 二零二五年度個人債務(wù)轉(zhuǎn)讓及債務(wù)清償方案合同4篇
- 二零二五年度建筑消防設(shè)施檢測與驗(yàn)收合同3篇
- 二零二五版相鄰工地塔吊施工安全保證合同6篇
- 二零二五版土地使用權(quán)轉(zhuǎn)讓居間合同范本(土地交易咨詢顧問)3篇
- 二零二五年度個性化民居裝修工程合同規(guī)范4篇
- 二零二五年度大型水箱采購合同范本3篇
- 介入科圍手術(shù)期護(hù)理
- 體檢科運(yùn)營可行性報(bào)告
- 青光眼術(shù)后護(hù)理課件
- 設(shè)立工程公司組建方案
- 設(shè)立項(xiàng)目管理公司組建方案
- 《物理因子治療技術(shù)》期末考試復(fù)習(xí)題庫(含答案)
- 退款協(xié)議書范本(通用版)docx
- 薪酬戰(zhàn)略與實(shí)踐
- 焊錫膏技術(shù)培訓(xùn)教材
- 江蘇省泰州市姜堰區(qū)2023年七年級下學(xué)期數(shù)學(xué)期末復(fù)習(xí)試卷【含答案】
- 答案之書(解答之書)-電子版精選答案
評論
0/150
提交評論