#include
#include
#include
using namespace std;
The class CStudent {
Private:
Char Name [21].
Int Num.
Int the Age;
Float MathS;
Float EngS;
Float the TotalS.
Public:
Void SetInfo (char * na, int num, int the age, float math, float eng);
Void TotalScore ();//calculate students overall
Void the OutPut ()//OutPut student information
{
Cout
...
Cout
}
};
Void CStudent: : SetInfo (char * na, int num, int the age, float math, float eng)
{
...
EngS=eng;
}
Void CStudent: : TotalScore ()
{
...
}
Int main ()
{
CStudent stu [3].
Char Na [21].
Int Nu;
Int Ag;
Float MS;
Float ES.
Cout<& lt;" Input student information: "& lt;
for(int i=0; I<3; I++)
{
cin> Na;
cin> Nu.
cin> Ag.
cin> MS;
cin> ES.
...
}
Cout<& lt;" Output student information: "& lt;
Cout<& lt;" The name "& lt; & lt;" Student id "& lt; & lt;" Age "& lt; & lt;" English & lt; & lt;" Mathematics & lt;" & lt;" Total score "& lt;
for(int i=0; I<3; I++)
{
...
}
return 0;
}