搜索
首页 电脑/网络 程序设计 C/C++

速求 数据结构C++学生成绩管理原代码

1.能完成对学生成绩的录入、修改2.能统计学生的成绩,求学生的总分及平均分,并能根据学生的平均成绩进行排序3.能查询学生成绩,不及格科目及学生名单4.能输出学生的成绩单5.采用菜单方式进行选择

全部回答

2018-03-29

0 0
    #include#include#includeclassstu{charname[20];doublemath,chinese,english,average,sum; (){}stu(charn[20],doublema,doublechin,doubleeng){strcpy(name,n);math=ma;chinese=chin;english=eng;}doublegetsum(){sum=chinese+english+math;returnsum;}doublegetaver(){average=getsum()/3;returnaverage;}friendvoidmain();};voidmain(){cout>p;if((p>='0'&&p>name;cout>math;cout>chinese;cout>english;file[j]=newofstream("d:\\document",ios::ate);*file[j]>c;flag2=0;do{if(c!='y'&&c!='n'){cout>c;}elseflag2=1;}while(flag2==0);}while(c=='y');break;}case'4':{doublet;charc;do{intflag1=0;cout>t;for(intq=0;qgetsum()==t){flag1=1;cout>c;if(c!='y'&&c!='n'){cout>c;}}while(c=='y');break;}case'5':{charn[20];intj=0;charc;do{intflag=0;cout>n;for(intj=0;j>c;if(c!='y'&&c!='n'){cout>c;}}while(c=='y');break;}case'1':{charname[20];doublemath,chinese,english;charc;do{cout>name;cout>math;cout>chinese;cout>english;file[j]=newofstream("d:\\document",ios::ate);*file[j]>c;if(c!='y'&&c!='n'){cout>c;}}while(c=='y');break;}case'2':{charname[20];boolflag3=0;charc;do{cout>name;for(inth=0;hname)==0){flag3=1;i--;do{s[h]=s[h+1];h++;}while(h>c;if(c!='y'&&c!='n'){cout>c;}}while(c=='y');break;}case'3':{charname[20];doublemat,chin,eng;flag2=0;charc;do{cout>name;for(inth=0;hname)==0){flag2=1;cout>mat;cout>chin;cout>eng;s[h]->chinese=chin;s[h]->math=mat;s[h]->english=eng;cout>c;if(c!='y'&&c!='n'){cout>c;}}while(c=='y');break;}case'6':{coutnamechinesemathenglishgetsum())getsum()))t=y;if(t!=x){b=*s[x];*s[x]=*s[t];*s[t]=b;}}}if(i==0)coutnamechinesemathenglishgetsum()getaver()chinese)chinese))t=y;if(t!=x){b=*s[t];*s[t]=*s[x];*s[x]=b;}}}if(i==0)coutnamechinesemathenglishgetsum()getaver()math)math))t=y;if(t!=x){b=*s[t];*s[t]=*s[x];*s[x]=b;}}}if(i==0)coutnamechinesemathenglishgetsum()getaver()english)english))t=y;if(t!=x){b=*s[t];*s[t]=*s[x];*s[x]=b;}}}if(i==0)coutnamechinesemathenglishgetsum()getaver()>w;if(w!='y'&&w!='n')cout>p;}while(w=='y');for(intx=0;x<i;x++){deletes[x];cout<<"deleteallmembers!"<<endl;}}。
    。

类似问题换一批

热点推荐

热度TOP

相关推荐
加载中...

热点搜索 换一换

电脑/网络
C/C++
硬件
电脑装机
程序设计
互联网
操作系统/系统故障
笔记本电脑
反病毒
百度
软件
程序设计
C/C++
VB
数据库
汇编语言
JAVA相关
VC++
C#/.NET
其他编程语言
C/C++
C/C++
举报
举报原因(必选):
取消确定举报