成绩管理系统88329

成绩管理系统88329

ID:19621605

大小:46.50 KB

页数:16页

时间:2018-10-04

成绩管理系统88329_第1页
成绩管理系统88329_第2页
成绩管理系统88329_第3页
成绩管理系统88329_第4页
成绩管理系统88329_第5页
资源描述:

《成绩管理系统88329》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库

1、成绩管理系统88329#include"stdio.h"#include"stdlib.h"#include"conio.h"#include"dos.h"#include"string.h"#defineLENsizeof(structstudent)#defineFORMAT"%d%s"voidmenu();voidprint(structstudent*);voidin();voidshow();voidsearch();voidmodify();voiddel();voidinsert();v

2、oidorder();structstudent{intnum;charname[15];floatscore[8];floatsum;floatavr;};structstudentstu[50];voidmenu(){system("cls");printf("");printf("ttt

3、--------成绩管理系统-------

4、");printf("ttt

5、1.inputrecord

6、");printf("ttt

7、2.showrecord

8、");pr

9、intf("ttt

10、3.searchrecord

11、");printf("ttt

12、4.modifyrecord

13、");printf("ttt

14、5.insertrecord

15、");printf("ttt

16、6.deleterecord

17、");printf("ttt

18、7.order

19、");printf("ttt

20、0.exit

21、");printf("ttt

22、---------------------------

23、");printf("tt

24、tchoose(0-7):");}voidprint(structstudent*p){printf(FORMAT,p->num,p->name);printf("");}voidshow(){FILE*fp;inti,j,m=0;fp=fopen("data.txt","r");while(!feof(fp)){if(fread(&stu[m],LEN,1,fp)==1)m++;}fclose(fp);printf("学号姓名英语数学数据体育语文物理毛概近代总分平均分");for(i=0;

25、i

26、e(!feof(fp)){if(fread(&stu[m],LEN,1,fp)==1)m++;}fclose(fp);if(m==0)printf("norecord!");else{system("cls");show();}if((fp=fopen("data.txt","w"))==NULL){printf("cannotopen!");return;}for(i=0;i

27、;scanf("%s",ch);while(strcmp(ch,"Y")==0

28、

29、strcmp(ch,"y")==0){printf("number:");scanf("%d",&stu[i].num);for(i=0;i

30、j<8;j++){printf("thescore%d",(j+1));scanf("%f",&stu[m].score[j]);stu[m].sum+=stu[m].score[j];}stu[m].avr=stu[m].sum/8;if(fwrite(&stu[m],LEN,1,fp)!=1){printf("cannotsave!");getch();}else{printf("%ssaved!",stu[m].name);m++;}printf(

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。