学生课程成绩查询管理信息系统分析与设计--代码
#include
#include
#include
#include
#include
using namespace std;
class student
{ private:
char name[20]; //姓名
double cpro,english,math,sport,law,hbpro,computer;//课程
int order, number; //名次,学号
public:
student(){}
student(char n[20],int nu,double cc,double eng,double ma,double sp,double l,double hb,double com)
{strcpy(name,n);
number=nu;
cpro=cc; english=eng;math=ma;sport=sp;law=l;hbpro=hb;computer=com;
}
friend void main();
};
void main()
{
cout<<" 欢迎进入**学生成绩管理系统**!"<>p;
if((p>='0'&&p<='6'))
flag=1;
else
cout<<" 指令错误!请重新输入:"<>name;
cout<>number;
cout<<" 请输入C++成绩:";
cin>>cpro;
cout<>english;
cout<>math;
cout<>sport;
cout<>law;
cout<>hbpro;
cout<>computer;
cout<>c;
cout<>c;
}
else
flag=1;
}while(flag==0);
}while(c=='y');
break;
}
case '1': //增加数据
{
char name[20];
int number;double cpro,english,math,sport,law,hbpro,computer;
char c;
do
{
cout<<" 请输入您要增加的学生的姓名:";
cin>>name;
cout<>number;
cout<>cpro;
cout<>english;
cout<>math;
cout<>sport;
cout<>law;
cout<>hbpro;
cout<>computer;
cout<>c;
cout<>c;
}
}while(c=='y');
break;
}
case '2': //修改数据
{
char name[20];int nu;double cc,eng,ma,sp,l,hb,com;flag=0;
char c;
if(i==0)
{
cout<<" 管理系统中没有输入数据!"<>name;
cout<name)==0)
{
flag=1;
cout<<" 请输入新的学号:";
cin>>nu;
cout<>cc;
cout<>eng;
cout<>ma;
cout<>sp;
cout<>l;
cout<>hb;
cout<>com;
cout<cpro=cc;
s[h]->english=eng;
s[h]->math=ma;
s[h]->sport=sp;
s[h]->law=
本文来源:https://www.2haoxitong.net/k/doc/5edd0df0376baf1ffc4faddf.html