#include<iostream>
using namespace std;
class CStudent
{
public:
CStudent(char nam,int num,int gra1,int gra2,int gra3):name(nam),number(num),grade1(gra1),grade2(gra2),grade3(gra3){}
void display()
{
cin>>name>>number>>grade1>>grade2>>grade3;
int z=(grade1+grade2+grade3)%3;
cout<<name<<number<<grade1<<grade2<<grade3<<z<<endl;
}
private:
char name;
int number;
int grade1;
int grade2;
int grade3;
};
int main()
{
CStudent stud1;
stud1.display();
return 0;
}
眼前的黑不是黑zz
相关分类