版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
1、.#include #include #include int main()int a,b,d,e,n,z;float c=0,g;printf(input student number(n30):n);scanf(%d,&n);long vn,f;float vcn;next:;int x1=0,x2=0,x3=0,x4=0,x5=0,x6=0;int z1=60,z2=69,z3=70,z4=79,z5=80,z6=89,z7=90,z8=99,z9=100; printf(management for students scoresn1.input recordn2.caculate t
2、otal and average score of coursen3.sort in descending order by scoren4.sort in ascending order by scoren5.sort in ascending order by numbern6.search by numbern7.statistic analysisn8.list recordn0.exitnplease input your choice:n);scanf(%d,&a);switch (a)case 1:printf(input students id and score:n);for
3、 (b=0;bn;b+)scanf(%ld%f,&vb,&vcb);break;case 2:for (b=0;bn;b+)c=c+vcb;printf(sum=%.0f,aver=%.2fn,c,c/n);break;.case 3:printf(sort in descending order by score:n);for (d=0;dn;d+)for (e=d+1;en;e+)if (vcdvce)g=vcd;vcd=vce;vce=g;g=vd;vd=ve;ve=g;for (b=0;bn;b+)printf(%ldt%.0fn,vb,vcb);break;case 4:printf
4、(sort in ascending order by score:n);for (d=0;dn;d+)for (e=d+1;evce)g=vcd;vcd=vce;vce=g;g=vd;vd=ve;ve=g;for (b=0;bn;b+)printf(%ldt%.0fn,vb,vcb);break;.case 5:printf(sort in ascending order by number:n);for (d=0;dn;d+)for (e=d+1;eve)g=vcd;vcd=vce;vce=g;g=vd;vd=ve;ve=g;for (b=0;bn;b+)printf(%ldt%.0fn,
5、vb,vcb);break;case 6:printf(input the number you want to search:n);scanf(%ld,&f);z=0;for (b=0;bn;b+)if (vb=f)printf(%ldt%.0fn,vb,vcb);z=1;break;if (z=0)printf(not found!n);break;case 7:for (b=0;bn;b+)if (vcb60);.x1+;else if (vcb70)x2+;else if (vcb80)x3+;else if (vcb90)x4+;else if (vcb100)x5+;elsex6+
6、;printf(60t%dt%.2f%n,x1,(float)x1/n*100);printf(%d-%dt%dt%.2f%n,z1,z2,x2,(float)x2/n*100);printf(%d-%dt%dt%.2f%n,z3,z4,x3,(float)x3/n*100);printf(%d-%dt%dt%.2f%n,z5,z6,x4,(float)x4/n*100);printf(%d-%dt%dt%.2f%n,z7,z8,x5,(float)x5/n*100);printf(%dt%dt%.2f%n,z9,x6,(float)x6/n*100);break;case 8:for (d=0;dn;d+)for (e=d+1;eve)g=vcd;vcd=vce;vce=g;g=vd;vd=ve;ve=g;for (b=0;bn;b+)printf(%ldt%.0fn,vb,v
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 葡萄溝教學反思三篇
- 車間員工安全培訓試題答案綜合題
- 《電動牙刷制造業(yè)綠色工廠評價要求》編制說明
- 2024-2030年中國硼中子吸收材料市場研發(fā)創(chuàng)新與投資潛力可行性研究報告
- 2024-2030年中國知識圖譜產(chǎn)業(yè)市場現(xiàn)狀供需分析及投資評估規(guī)劃分析研究報告
- 2024-2030年中國眼鏡架市場消費趨勢調(diào)研與投資效益分析研究報告
- 2024-2030年中國直鏈烷基苯(LAB)行業(yè)供需趨勢及投資盈利預測報告
- 2024-2030年中國鹽汽水市場消費規(guī)模預測及發(fā)展趨勢預判報告
- 2024-2030年中國白菜市場營銷渠道與未來銷售渠道趨勢預測研究報告
- 2024-2030年中國病房護理設備行業(yè)市場發(fā)展分析及投資前景與投資策略研究報告
- 農(nóng)業(yè)政策學PPT完整全套教學課件
- 小區(qū)汽車停放問題調(diào)查報告
- 項目背景分析
- 肌肉骨骼康復學教案
- 2023年物業(yè)管理師考試題庫附答案(通用版)
- 小學心理健康教育《愉快的假期》教學設計
- 完整word版,七年級上冊地理知識點填空
- 新概念英語第三冊課文(全60課)
- 高中物理 人教版 選修一《動量守恒定律》單元第六課時
- 中國普通食物營養(yǎng)成分表一覽
- 中國特色社會主義社會建設
評論
0/150
提交評論