帮我看看为什么这样吖.30分

#include

#include

using namespace std;

class student

{public:

string stuname;

long int stumark;

long int stucmark;

char stugb;

char stuxb;

long int stutext;

long int stuaward;

void Setdata(string name,long int mark=0,long int cmark=0,char gb='N',char xb='N',long int text=0,long int award=0)

{stuname=name;stumark=mark;stucmark=cmark;stugb=gb;stuxb=xb;stutext=text;stuaward=award;}

};

int main(int argc, char *argv[])

{ long int stunum=0;

string stuname;

long int stumark=0;

long int stucmark=0;

char stugb;

char stuxb;

long int stutext=0;

long int stuaward=0;

long int stuall=0;

long int hnum=0;

do

{cin>>stunum;

}

while(stunum100);

student *pstudent=new student[stunum];

long int stupriceh=0;

string highpricestu[100];

for(int i=0;i>stuname>>stumark>>stucmark>>stugb>>stuxb>>stutext;

pstudent[i].Setdata(stuname,stumark,stucmark,stugb,stuxb,stutext);

}

for(int y=0;y80 && pstudent[y].stutext>=1)

{pstudent[y].stuaward+=8000;}

if(pstudent[y].stumark>85 && pstudent[y].stucmark>80)

{pstudent[y].stuaward+=4000;}

if(pstudent[y].stumark>90)

{pstudent[y].stuaward+=2000;}

if(pstudent[y].stumark>85 && pstudent[y].stuxb=='Y')

{pstudent[y].stuaward+=1000;}

if(pstudent[y].stumark>80 && pstudent[y].stugb=='Y')

{pstudent[y].stuaward+=850;}

stuall+=pstudent[y].stuaward;

if (stupriceh

0 条评论

目前还没有评论...

信息

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