只有30分,不知道为什么,哪位大哥帮看看

#include

using namespace std;

class Student

{

private:

int termscore;

int classscore;

char cadre;

char fromwest;

int papernum;

int collegeprz();

int ffprz();

int greatprz();

int westprz();

int contriprz();

public:

char name[20];

int total;

Student();

void totalprz();

};

Student::Student()

{

cin>>name>>termscore>>classscore>>cadre>>fromwest>>papernum;

}

int Student::collegeprz()

{

if(termscore>80&&papernum>=1)

return 8000;

else

return 0;

}

int Student::ffprz()

{

if(termscore>85&&classscore>80)

return 4000;

else

return 0;

}

int Student::greatprz()

{

if(termscore>90)

return 2000;

else

return 0;

}

int Student::westprz()

{

if(termscore>85&&'Y'==fromwest)

return 1000;

else

return 0;

}

int Student::contriprz()

{

if(termscore>80&&'Y'==cadre)

return 850;

else

return 0;

}

void Student::totalprz()

{

total=collegeprz()+ffprz()+greatprz()+westprz()+contriprz();

}

int main()

{

int num;

cin>>num;

Student* stu=new Student[num];

for(int i=0;itotalprz();

}

int max=0,count=0;

char* name;

for(int j=0;jtotal>max)

{

max=(stu+j)->total;

name=(stu+j)->name;

}

count+=(stu+j)->total;

}

cout

0 条评论

目前还没有评论...

信息

ID
1001
难度
5
分类
模拟 点击显示
标签
递交数
39100
已通过
12719
通过率
33%
被复制
121
上传者