为什么是零分呢

#include <iostream>
#include <string>
using namespace std;
int main()
{
string name, Mname;
int grade,Cgrade ,ms, N, money = 0, result = 0, sum = 0;
char gb,xb;
cin >> N;
for (int i = 1; i <= N; i++)
{
cin >> name >> grade >> Cgrade >> gb >> xb >> ms;
if (grade>80 && ms >= 1)
money+=8000;
if (grade > 85 && Cgrade > 80)
money+=4000;
if (grade > 90)
money+=2000;
if (grade > 85 && xb == 'Y')
money+=1000;
if (Cgrade > 80 && gb == 'Y')
money+=850;
sum+=money;
if (result < money)
{
result = money;
Mname = name;
}
}
cout << Mname << endl << result << endl << sum << endl;
system("pause");
return 0;
}

1 条评论

  • 1

信息

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