题解 | #判断成绩等级#

判断成绩等级

https://www.nowcoder.com/practice/1a12e246764243ada9043699b9a1e7ef

#include <iostream>
using namespace std;

int main() {

    int score;
    cin >> score;

    // write your code here......
    if (score < 0) {
        cout << "成绩不合法" << endl;
    } else if (score < 60) {
        cout << "差" << endl;
    } else if (score < 70) {
        cout << "及格" << endl;
    } else if (score < 80) {
        cout << "中" << endl;
    } else if (score < 90) {
        cout << "良" << endl;
    } else if (score <= 100) {
        cout << "优秀" << endl;
    } else {
        cout << "成绩不合法" << endl;
    }

    return 0;
}

全部评论

相关推荐

11-19 18:44
已编辑
成都理工大学 Java
程序员花海:我面试过100+校招生,大厂后端面试不看ACM,竞赛经历含金量低于你有几份大厂实习 这个简历整体来看不错 可以海投
如何写一份好简历
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务