#include<iostream>
#include <string>
using namespace std;
class Student
{
private:
int num1,num2,num3,mun4,num5,num6,num7,num8;
string name1,name2,name3,name4,name5,name6,name7,mane8;
int age1,ahe2,age3,age4,age5,age6,age7,age8;
char sex1,sex2,sex3,sex4,sex5,sex6,sex7,sex8;
int a1,a2,a3,a4,a5,a6,a7,a8;
int b1,b2,b3,b4,b5,b6,b7,b8;
int c1,c2,c3,c4,c5,c6,c7,c8;
int d1,d2,d3,d4,d5,d6,d7,d8;
int e1,e2,e3,e4,e5,e6,e7,e8;
void num()
{cin>>"num1:">>"06300685">>endl;
cin>>"num2:">>"06300686">>endl;
cin>>"num3:">>"06300687">>endl;
cin>>"num4:">>"06300688">>endl;
cin>>"num5:">>"06300689">>endl;
cin>>"num6:">>"06300690">>endl;
cin>>"num7:">>"06300691">>endl;
cin>>"num8:">>"06300692">>endl;
};
void name()
{cin>>"name1:">>"譁鄵">>endl;
cin>>"name2:">>"詉庅枏">>endl;
cin>>"name3:">>"脦塍蓲">>endl;
cin>>"name4:">>"虠轑鲻">>endl;
cin>>"name5:">>"醟朙籩">>endl;
cin>>"name6:">>"臡鼐孻">>endl;
cin>>"name7:">>"恴赨">>endl;
cin>>"name8:">>"絼躢閁鍀">>endl;
};
void age()
{cin>>"age1:">>20>>endl;
cin>>"age2:">>21>>endl;
cin>>"age3:">>19>>endl;
cin>>"age4:">>20>>endl;
cin>>"age5:">>22>>endl;
cin>>"age6:">>19>>endl;
cin>>"age7:">>19>>endl;
cin>>"age8:">>21>>endl;
};
void sex()
{cin>>"sex1:">>"男">>endl;
cin>>"sex2:">>"女">>endl;
cin>>"sex3:">>"男">>endl;
cin>>"sex4:">>"男">>endl;
cin>>"sex5:">>"女">>endl;
cin>>"sex6:">>"男">>endl;
cin>>"sex7:">>"男">>endl;
cin>>"sex8:">>"男">>endl;
};
int a1=88,b1=81,c1=75,d1=66,e1=53;
int a2=92,b2=67,c2=89,d2=68,e2=70;
int a3=53,b3=99,c3=76,d3=76,e3=80;
int a4=78,b4=79,c4=75,d4=76,e4=99;
int a5=60,b5=61,c5=54,d5=65,e5=90;
int a6=88,b6=87,c6=89,d6=100,e6=86;
int a7=64,b7=67,c7=30,d7=478,e7=62;
int a8=46,b8=58,c8=21,d8=80,e8=66;
};
int main()
{cout<<"请输入学号:"<<endl;
int s;
cin>>s;
if(s=num1)
{cout<<num1<<" "<<name1<<" "<<sex1<<" "<<a1+b1+c1+d1+e1<<endl;}
if(s=num2)
{cout<<num2<<" "<<name2<<" "<<sex2<<" "<<a2+b2+c2+d2+e2<<endl;}
if(s=num3)
{cout<<num3<<" "<<name3<<" "<<sex3<<" "<<a3+b3+c3+d3+e3<<endl;}
if(s=num4)
{cout<<num4<<" "<<name4<<" "<<sex4<<" "<<a4+b4+c4+d4+e4<<endl;}
if(s=num5)
{cout<<num5<<" "<<name5<<" "<<sex5<<" "<<a5+b5+c5+d5+e5<<endl;}
if(s=num6)
{cout<<num6<<" "<<name6<<" "<<sex6<<" "<<a6+b6+c6+d6+e6<<endl;}
if(s=num7)
{cout<<num7<<" "<<name7<<" "<<sex7<<" "<<a7+b7+c7+d7+e7<<endl;}
if(s=num8)
{cout<<num8<<" "<<name8<<" "<<sex8<<" "<<a8+b8+c8+d8+e8<<endl;}
else cout<<"学号错误:"<<endl;}
return 0;
}
错误比行数还多~~~~~~~!!!!!!