Run ID:138364

提交时间:2025-11-24 16:58:40

#include <iostream> using namespace std; int main() { int a; // 读取输入的成绩 cin >> a; // 按分数区间判断等级(从高到低,逻辑简洁) if (a >= 90) { cout << 'A' << endl; } else if (a >= 80) { // 隐含 a < 90 cout << 'B' << endl; } else if (a >= 70) { // 隐含 a < 80 cout << 'C' << endl; } else if (a >= 60) { // 隐含 a < 70 cout << 'D' << endl; } else { // 所有低于60的情况 cout << 'E' << endl; } return 0; }