cout<<"性别(男或女):"; cin>>sex;
cout<<"英语:" ;cin>>english;
cout<<"高数:";cin>>math;
cout<<"C++:";cin>>c;
cout<<"大学物理:";cin>>wl;
sum=(english)+(math)+c+wl;
average=sum/4;}
void STUDENT::Input(ifstream &f)
{ f>>term;
f>>cname;
f>>num;
f>>name;
f>>sex;
f>>english;
f>>math;
f>>c;
f>>wl;
f>>sum;
f>>average; }
{cout<<setw(5)<<"学期";
cout<<setw(5)<<"班级";
cout<<setw(5)<<"学号";
cout<<setw(8)<<"姓名";
cout<<setw(5)<<"性别";
cout<<setw(7)<<"英语";
cout<<setw(7)<<"高数";
cout<<setw(7)<<"C++";
cout<<setw(7)<<"物理";
cout<<setw(7)<<"总分";
cout<<setw(7)<<"平均成绩"<<endl; }
void STUDENT::OutputTtwo()
{
cout<<setw(5)<<"班级";
cout<<setw(5)<<"学号";
cout<<setw(8)<<"姓名";
cout<<setw(5)<<"性别"<<endl;}
void STUDENT::Output()
{cout<<setw(5)<<term;
cout<<setw(5)<<cname;
cout<<setw(5)<<num;
cout<<setw(8)<<name;
cout<<setw(5)<<sex;
cout<<setw(7)<<english;
cout<<setw(7)<<math;
cout<<setw(7)<<c;
cout<<setw(7)<<wl;
cout<<setw(7)<<sum;
cout<<setw(7)<<average<<endl; }
void STUDENT::Outputtwo()
{cout<<setw(5)<<cname;
cout<<setw(5)<<num;
cout<<setw(8)<<name;
cout<<setw(5)<<sex<<endl;}
void STUDENT::OutputT(ofstream &f)
{f<<setw(5)<<"学期";
f<<setw(5)<<"班级";
f<<setw(5)<<"学号";
f<<setw(8)<<"姓名";
f<<setw(5)<<"性别";
f<<setw(7)<<"英语";
f<<setw(7)<<"高数";
f<<setw(7)<<"C++";
f<<setw(7)<<"物理";
f<<setw(7)<<"总分";
f<<setw(7)<<"平均成绩"<<endl; }
void STUDENT::OutputTtwo(ofstream &f)
{f<<setw(5)<<"学期";
f<<setw(5)<<"班级";
f<<setw(5)<<"学号";
f<<setw(8)<<"姓名";
f<<setw(5)<<"性别";}
{f<<setw(5)<<term;
f<<setw(5)<<cname;
f<<setw(5)<<num;
f<<setw(8)<<name;
f<<setw(5)<<sex;
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>