诸君,有人知道为什么错吗?

#include <iostream>
#include <string>
using namespace std;
int main()
{
struct studentstruct
{
string name;
int examp;
int classp;
char manager;
char west;
int lunwen;
int money;
string highestn;
int highestm;
int moneys;
}student;

int a;
cin>>a;
for(int i=0;i!=a;i++)
{
student.money=0;
cin>>student.name>>student.examp>>student.classp>>student.manager>>student.west>>student.lunwen;
if (student.examp>80&&student.lunwen>=1)
student.money+=8000;
if (student.examp>85&&student.classp>=80)
student.money+=4000;

if (student.examp>90)
student.money+=2000;
if (student.examp>85&&student.west=='Y')
student.money+=1000;
if (student.classp>80&&student.manager=='Y')
student.money+=850;
if (student.money>student.highestm)
{
student.highestm=student.money;
student.highestn=student.name;
}
student.moneys+=student.money;

}
cout<<student.highestn<<endl;
cout<<student.highestm<<endl;
cout<<student.moneys<<endl;
return 0;
}

在自己的电脑上都没有问题

1 条评论

  • 1

信息

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