class student
{
public:
double scorea;
double scoreb;
double scorec;
double scored;
int num;
string name;
double total(){return scorea+scoreb+scorec+scored;};
};
void main()
{
student str[5];
double avr[5]={0};
int i=0;
for(;i<5;i++)
{
cout << "输入学号和成绩";
cin >> str[i].num >> str[i].scorea >> str[i].scoreb >> str[i].scorec >> str[i].scored ;
}
cout << "总成绩:"<
{
cout << str[i].num <<":"<
for ( i=0;i<5;i++)
{
avr[0]+=str[i].scorea;
avr[1]+=str[i].scorea;
avr[2]+=str[i].scorea;
avr[3]+=str[i].scorea;
avr[4]+=str[i].scorea;
}
cout << "每科平均成绩:"<
//
int topnun=0;
for ( i=1;i<5;i++)
{
if(str[topnun].total
}
cout<< "最高分:"<
int topnun[5]={0};
for ( i=1;i<5;i++)
{
if(str[topnun[0]].scorea
if(str[topnun[1]].scorea
if(str[topnun[2]].scorea
if(str[topnun[3]].scorea
if(str[topnun[4]].scorea
}
cout<< "scorea最高分:"<
是帮你写??还是你写了帮你完善?