学生成绩管理系统V2.0_第1页
学生成绩管理系统V2.0_第2页
学生成绩管理系统V2.0_第3页
学生成绩管理系统V2.0_第4页
学生成绩管理系统V2.0_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论