题解 | #判断成绩等级#
判断成绩等级
https://www.nowcoder.com/practice/1a12e246764243ada9043699b9a1e7ef
#include <iostream> using namespace std; int main() { int score; cin >> score; // write your code here...... cout << (score < 0 || score > 100 ? "成绩不合法": (score <= 100 && score >= 90 ? "优秀": (score <= 89 && score >= 80 ? "良": (score <= 79 && score >= 70 ? "中": (score <= 69 && score >= 60 ? "及格":"差"))))); return 0; }