下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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 to
2、tal 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:print
4、f(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,
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 《计算机应用基础(Windows 7+Office 2010)》中职全套完整教学课件
- 2024买卖解除合同范本参考
- 2024东莞劳动合同(示范文本)
- 江苏省三校2021-2022学年高考物理一模试卷含解析
- 2024劳动合同终止该注意的事项
- 2023年秋季安全学原理期末复习题
- 2024中外劳务合同范本
- 2024版产品销售合同范本
- 旅行社与酒店的合作协议(标准版)
- 七年级英语上册期中试卷
- 诚信教育课件
- 2024至2030年中国工业加湿器行业市场专项调研及竞争战略分析报告
- 统编版(2024)七年级上册道德与法治3.1《做有梦的少年》教案
- 各类学校校园安全应急预案汇编-(附应急全套流程图)
- 2024-2025学年八年级地理上册 第一章 单元测试卷(人教版)
- NB-T32042-2018光伏发电工程建设监理规范
- 青少年网络安全教育PPT
- (完整版)生育服务证办理承诺书
- 电梯轿厢装饰装修施工工艺方案(完整版)
- 三甲医院行政管理方面制度
- 桑树病虫害防治
评论
0/150
提交评论