ImageVerifierCode 换一换
格式:DOCX , 页数:15 ,大小:16.96KB ,
资源ID:20337269      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/20337269.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(语言输入输出排序打印学生成绩单Word文档下载推荐.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

语言输入输出排序打印学生成绩单Word文档下载推荐.docx

1、 printf(Input student number(nN | n 1) return 0; else /主程序 while(con != 0) /输出 printf(nManagement for Students scoresn1.Append recordn2.Calculate total and average score of every coursen3.Calculate total and average score of every studentn4.Sort in descending order by total score of every studentn5.

2、Sort in ascending order by total score of every studentn6.Sort in ascending order by numbern7.Sort in dictionary order by namen8.Search by numbern9.Search by namen10.Statistic analysisn11.List recordn12.Write to a filen13.Read from a filen0.Exitn / 录入学生的人数:Please Input your choice: scanf(con); / 录入每

3、个学生的学号、姓名和各科成绩: if(con = 1) printf(Input students ID,name and score:n for(i = 0; i n; i+) scanf(%ld, &stui.id); getchar(); fgets(stui.name, sizeof(stui.name), stdin);/有问题!%f %f %fstui.score0, &stui.score1, &stui.score2); / 计算每门课程的总分和平均分: else if(con = 2) addc(stu, n); / 计算每个学生各门课程的总分和平均分: else if(co

4、n = 3) adds(stu, n); / 按总成绩由高到低排出名次表: else if(con = 4)Sort in descending order by total score of every student:NOtNametMTtENtPHtSUMtAVERn pxs(stu, ds, n); / 按总成绩由低到高排出名次表: else if(con = 5)Sort in ascending order by total score of every student: pxs(stu, as, n); / 按学号由小到大排出成绩表: else if(con = 6)Sort i

5、n ascending order by number: pxi(stu, n); / 按姓名的字典顺序排出成绩表: else if(con = 7)Sort in dictionary order by name: pxn(stu, n); / 按学号查询学生排名、学号、姓名及其考试成绩: else if(con = 8) seai(stu, n); / 按姓名查询学生排名、学号、姓名及其考试成绩: else if(con = 9) sean(stu, n); / 按100,(90100)(8089)(7079)(6069)(059)统计各科每个类别的人数以及所占的百分比: else if(

6、con = 10) ana(stu, n); /输出信息 else if(con = 11) for(i=0;in;i+) printf(%ldt, stui.id); for(j=0;stui.namej!=n;j+) putchar(stui.namej); t%.0ft%.0ft%.0ft%.0ft%.0fn, stui.score0, stui.score1, stui.score2, stui.score3, (stui.score3/3); /写入文件 else if(con = 12) wri(stu, n); /读取文件 else if(con = 13) rea(stu, n

7、); else if(con = 0)End of program! elseInput error! return 0;void addc(struct student *pt, int n) int i, j; float sum; for(j=0;j3; sum = 0; for(i=0; sum += stui.scorej; printf(course %d:sum=%.0f,aver=%.0fn, (j+1), sum, (sum/n);void adds(struct student *pt, int n) int i; for(i=0; stui.score3 = stui.s

8、core0 + stui.score1 + stui.score2;student %d:, (i+1), stui.score3, (stui.score3/3);void pxs(struct student *pt, int (*comp)(float a, float b), int n) struct student temp; for(j=0;(n-i-1); if(*comp)(stuj.score3, stuj+1.score3) temp = stuj; stuj = stuj+1; stuj+1 = temp; putchar(stui.namej);int ds(floa

9、t a, float b) return avoid pxi(struct student *pt, int n) if(stuj.id stuj+1.id)void pxn(struct student *pt, int n) if(strcmp(stuj.name,stuj+1.name)0)void seai(struct student *pt, int n) int i, j, con=0; long id;Input the number you want to search:id); if(stuj.score3stuj+1.score3) if(stui.id=id)%dt%l

10、dt, (i+1), stui.id); for(j=0; con=1; break; if(con=0)Not found!void sean(struct student *pt, int n) char name10;Input the name you want to search: getchar(); fgets(name, sizeof(name), stdin); if(strcmp(stui.name, name)=0)void ana(struct student *pt, int n) int i, j, n1, n2, n3, n4, n5, n6; n1=0;n2=0

11、;n3=0;n4=0;n5=0;n6=0; if(stui.scorej60) n1+=1; else if(stui.scorej70) n2+=1;80) n3+=1;90) n4+=1;=100) n5+=1; if(stui.scorej=100) n6+=1;For course %d:, (j+1);60t%dt%.2f%n, n1, 100*(float)n1/n);%d-%dt%dt%.2f%n, 60, 69, n2, 100*(float)n2/n);, 70, 79, n3, 100*(float)n3/n);, 80, 89, n4, 100*(float)n4/n);

12、, 90, 100, n5, 100*(float)n5/n);%dt%dt%.2f%n, 100, n6, 100*(float)n6/n);void wri(STUDENT *pt, int n) FILE *fp; if(fp = fopen(student.txt, w) = NULL) exit(0); /fprintf(fp, fprintf(fp, fprintf(fp, %c, stui.namej); fclose(fp);save successfully!void rea(STUDENT *pt, int n) int m; long a; float c,d,e,f,g; char b10; /char head50;r exit(0); /fgets(head, 50, fp); /puts(head); for(m = 0; m m+) /printf(scjdbfdsdj fscanf(fp, a);, a);%10s, b);%st fscanf(fp, %fc);%.0ft, c);%fd);, d);e);, e);f);, f);g);%.0fn, g); /printf(jdhergjdkfnjherdgfdhbn

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1