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

加入VIP,免费下载
 

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

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

下载须知

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

版权提示 | 免责声明

本文(c++大作业学生信息管理系统源代码.docx)为本站会员(b****8)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

c++大作业学生信息管理系统源代码.docx

1、c+大作业学生信息管理系统源代码学生信息管理系统源代码:struct studentchar num30; int maths; char name30; int chinese;char clas30; int english; int total; float average; student *next;/1(1)void createlist(student * & head) /学生成绩文件导入功能(用链表储存)char t80,num030,name030,clas030;int chinese0,maths0,english0;student *s,*p;if (!instuf)

2、 cerrfile could not be open.num0name0clas0chinese0maths0english0) s=new student; strcpy(s-num,num0);strcpy(s-name,name0);strcpy(s-clas,clas0); s-chinese=chinese0;s-maths=maths0;s-english=english0; s-total=s-chinese+s-maths+s-english; s-average=float(s-total)/3; if (head=NULL) head=s; else p-next=s;

3、p=s;p-next=NULL;/1(2)void showlist(student *head) /学生成绩信息显示功能(遍历链表) int n=1; cout学号 姓名 班级 语文 数学 英语 总分 均分 序号 ; while (head) coutnum nametclast chineset mathstenglishttotaltsetprecision(3)averaget nnext; /2void charu(student *head) /学生成绩信息插入功能(链表尾部插入学生成绩信息) student *s,*p,*q; int n,i; coutn; cout请输入需插入

4、的学生成绩信息(每人一行):endl; cout学号 姓名 班级 语文 数学 英语next; for (i=1;is-nums-names-class-chineses-mathss-english; s-total=s-chinese+s-maths+s-english; s-average=float(s-total)/3; q-next =s; q=s; q-next=NULL;/3void shanchu(student * & head) /学生成绩信息删除功能 student *p,*q; char a30; int n,i,b=1; coutn; cout请输入需要删除的学生的学

5、号或姓名:endl; for (i=1;ia; if (strcmp(head-num,a)=0)|(strcmp(head-name,a)=0) b=0; p=head; head=head-next; delete p; p=NULL; else p=head; while (p-next!=NULL)&(strcmp(p-next-num,a)!=0)&(strcmp(p-next-name,a)!=0) p=p-next; if (p-next!=NULL) b=0; q=p-next; p-next=q-next; delete q; q=NULL; if (b=1) cout无此学

6、号或姓名的成绩记录!endl;/4void change(student *head) /学生成绩信息的修改功能(修改指定学生信息) char a30; int b=1; couta; while (head) if (strcmp(head-num,a)=0)|(strcmp(head-name,a)=0) coutendl; b=0; cout此学生原来的学生成绩信息是:endl; cout学号 姓名 班级 语文 数学 英语endl; coutnum nametclast chinesetmathstenglishendl; cout请输入修改后的学生成绩信息:endl; cout学号 姓

7、名 班级 语文 数学 英语head-numhead-namehead-clashead-chinesehead-mathshead-english; head-total=head-chinese+head-maths+head-english; head-average=float(head-total)/3; head=head-next; if (b=1) cout无此学号或姓名的成绩记录!endl;/5(1)void geren(student *head) /查询个人成绩功能 char a30; int b=1; couta; cout此学生的学生成绩信息是:endl; cout学号

8、 姓名 班级 语文 数学 英语 总分 均分num,a)=0)|(strcmp(head-name,a)=0) b=0; coutnum nametclast chineset mathstenglishttotaltsetprecision(3)averagenext; if (b=1) cout无此学号或姓名的成绩记录!endl;/5(2)void chabanji(student *head) /查询班级成绩功能 char a30; int b=1; couta; cout此班级的学生成绩信息是:endl; cout学号 姓名 班级 语文 数学 英语 总分 均分clas,a)=0) b=0

9、; coutnum nametclast chineset mathstenglishttotaltsetprecision(3)averagenext; if (b=1) cout无此班级的成绩记录!endl;/5(3)void chayuwen(student *head) /查询语文成绩功能 int h,l,b=1; cout请输入您要查询的【语文】成绩的分数段: endl; cout起始分 终止分l; cinh; cout此分数段的学生语文成绩信息是:endl; cout学号 姓名 班级 语文 数学 英语 总分 均分chinese=l)&(head-chinese=h) b=0; co

10、utnum nametclast chineset mathstenglishttotaltsetprecision(3)averagenext; if (b=1) cout无此分数段的语文成绩记录!endl;/5(4)void chashuxue(student *head) /查询数学成绩功能 int h,l,b=1; cout请输入您要查询的【数学】成绩的分数段: endl; cout起始分 终止分l; cinh; cout此分数段的学生数学成绩信息是:endl; cout学号 姓名 班级 语文 数学 英语 总分 均分maths=l)&(head-maths=h) b=0; coutnu

11、m nametclast chineset mathstenglishttotaltsetprecision(3)averagenext; if (b=1) cout无此分数段的数学成绩记录!endl;/5(5)void chayingyu(student *head) /查询英语成绩功能 int h,l,b=1; cout请输入您要查询的【英语】成绩的分数段: endl; cout起始分 终止分l; cinh; cout此分数段的学生英语成绩信息是:endl; cout学号 姓名 班级 语文 数学 英语 总分 均分english=l)&(head-english=h) b=0; coutnu

12、m nametclast chineset mathstenglishttotaltsetprecision(3)averagenext; if (b=1) cout无此分数段的英语成绩记录!endl;/5(6)void chazongfen(student *head) /查询总分成绩功能 int h,l,b=1; cout请输入您要查询的【总分】成绩的分数段: endl; cout起始分 终止分l; cinh; cout此分数段的学生总分成绩信息是:endl; cout学号 姓名 班级 语文 数学 英语 总分 均分total=l)&(head-total=h) b=0; coutnum n

13、ametclast chineset mathstenglishttotaltsetprecision(3)averagenext; if (b=1) cout无此分数段的总分成绩记录!next; while (q) if (p-chinesechinese) strcpy(a,p-num);strcpy(p-num,q-num);strcpy(q-num,a); strcpy(a,p-name);strcpy(p-name,q-name);strcpy(q-name,a); strcpy(a,p-clas);strcpy(p-clas,q-clas);strcpy(q-clas,a); b=

14、p-chinese;p-chinese=q-chinese;q-chinese=b; b=p-maths;p-maths=q-maths;q-maths=b; b=p-english;p-english=q-english;q-english=b; b=p-total;p-total=q-total;q-total=b; c=p-average;p-average=q-average;q-average=c; q=q-next; p=p-next; /6(2)void shuxue(student *head) /按数学成绩从高到低排序功能 student *p,*q; char a30; i

15、nt b; float c; p=head; while (p) q=p-next; while (q) if (p-mathsmaths) strcpy(a,p-num);strcpy(p-num,q-num);strcpy(q-num,a); strcpy(a,p-name);strcpy(p-name,q-name);strcpy(q-name,a); strcpy(a,p-clas);strcpy(p-clas,q-clas);strcpy(q-clas,a); b=p-chinese;p-chinese=q-chinese;q-chinese=b; b=p-maths;p-maths

16、=q-maths;q-maths=b; b=p-english;p-english=q-english;q-english=b; b=p-total;p-total=q-total;q-total=b; c=p-average;p-average=q-average;q-average=c; q=q-next; p=p-next; /6(3)void yingyu(student *head) /按英语成绩从高到低排序功能 student *p,*q; char a30; int b; float c; p=head; while (p) q=p-next; while (q) if (p-e

17、nglishenglish) strcpy(a,p-num);strcpy(p-num,q-num);strcpy(q-num,a); strcpy(a,p-name);strcpy(p-name,q-name);strcpy(q-name,a); strcpy(a,p-clas);strcpy(p-clas,q-clas);strcpy(q-clas,a); b=p-chinese;p-chinese=q-chinese;q-chinese=b; b=p-maths;p-maths=q-maths;q-maths=b; b=p-english;p-english=q-english;q-en

18、glish=b; b=p-total;p-total=q-total;q-total=b; c=p-average;p-average=q-average;q-average=c; q=q-next; p=p-next; /6(4)void zongfen(student *head) /按总分成绩从高到低排序功能 student *p,*q; char a30; int b; float c; p=head; while (p) q=p-next; while (q) if (p-totaltotal) strcpy(a,p-num);strcpy(p-num,q-num);strcpy(q

19、-num,a); strcpy(a,p-name);strcpy(p-name,q-name);strcpy(q-name,a); strcpy(a,p-clas);strcpy(p-clas,q-clas);strcpy(q-clas,a); b=p-chinese;p-chinese=q-chinese;q-chinese=b; b=p-maths;p-maths=q-maths;q-maths=b; b=p-english;p-english=q-english;q-english=b; b=p-total;p-total=q-total;q-total=b; c=p-average;p

20、-average=q-average;q-average=c; q=q-next; p=p-next; /7void xuehao(student *head) /按学号从小到大排序功能 student *p,*q; char a30; int b; float c; p=head; while (p) q=p-next; while (q) if (strcmp(p-num,q-num)0) strcpy(a,p-num);strcpy(p-num,q-num);strcpy(q-num,a); strcpy(a,p-name);strcpy(p-name,q-name);strcpy(q-

21、name,a); strcpy(a,p-clas);strcpy(p-clas,q-clas);strcpy(q-clas,a); b=p-chinese;p-chinese=q-chinese;q-chinese=b; b=p-maths;p-maths=q-maths;q-maths=b; b=p-english;p-english=q-english;q-english=b; b=p-total;p-total=q-total;q-total=b; c=p-average;p-average=q-average;q-average=c; q=q-next; p=p-next; /8voi

22、d xingming(student *head) /按姓名首字母排序功能 student *p,*q; char a30; int b; float c; p=head; while (p) q=p-next; while (q) if (strcmp(p-name,q-name)0) strcpy(a,p-num);strcpy(p-num,q-num);strcpy(q-num,a); strcpy(a,p-name);strcpy(p-name,q-name);strcpy(q-name,a); strcpy(a,p-clas);strcpy(p-clas,q-clas);strcpy(q-clas,a); b=p-chinese;p-chinese=q-chinese;q-chinese=b; b=p-maths;p-maths=q-maths;q-math

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

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