杭电OJ2004

#include <iostream>
using namespace std;
int main()
{
	int x;
	while (cin >> x)
	{
		if (90 <= x&&x <= 100) cout << 'A' << endl;
		else if (80 <= x&&x <= 89) cout << 'B' << endl;
		else if (70 <= x&&x <= 79) cout << 'C' << endl;
		else if (60 <= x&&x <= 69) cout << 'D' << endl;
		else if (0 <= x&&x <= 59) cout << 'E' << endl;
		else cout << "Score is error!" << endl;
	}
}

猜你喜欢

转载自blog.csdn.net/weixin_42265486/article/details/83505746