你追问2次,我分3次发给你,一次字数太多,发不上来
#include
using namespace std;
#include
class Grade
{
private:
char name[10];
int english,math,computer;
public:
char id[10];
void copy(Grade& m)
{
strcpy(name,m.name);
strcpy(id,m.id);
english=m.english;
math=m.math;
computer=m.computer;
}
void setgrade()
{
int count=0;
cout>id;
while(strlen(id)!=10)
{
cout>id;
}
cout>name;
if(strlen(name)>=10)
{
cout>name;
}
cout>english;
if(english>100||english>english;
}
cout>math;
if(math>100||math>math;
}
cout>computer;
if(computer>100||computer>computer;
}
}