#include
#include
#include
usingnamespacestd;
staticp=0;
classScore
{
public:
floatcomputer;
floatenglish;
floatmathematics;
floattotal;
Score()
{
computer=0;
english=0;
mathematics=0;
}
Score(floata,floatb,floatc)
{
computer=a;
english=b;
mathematics=c;
total=0;
}
voidsum()
{
total=computer+english+mathematics;
}
voidprint()
{
cout
}
voidmodify()
{
cin>>computer>>english>>mathematics;
}
};
classStudent
{
public:
intnumber;
stringname;
Scoreascore;
Student(){}
Student(intd,stringe,floatf,floatg,floato):
ascore(f,g,o)
{
number=d;
name=e;
}
voidsum()
{
ascore.sum();
}
voidprint()
{ if(p==0)
cout
cout
cout
cout
cout
p++;
}
voidmodify()
{
cin>>number>>name;
ascore.modify();
}
};
intmain(void)
{
inti;
Students[2];
for(i=0;i
{
s[i].modify();
s[i].sum();
}
for(i=0;i
s[i].print();
return0;
}