5 条题解

  • 1
    @ 2024-2-16 10:08:59

    这一道题非常简单,就是考察分支判断,用上if-else if- else语句就可以解决,废话不多说,上代码!

    已AC,请放心食用

    #include <iostream>
    using namespace std;
    int main()
    {
        int score;
        cin >> score;
        if (score >= 90)
        {
            cout << "Excellent";
        }
        else if (score >= 80)
        {
            cout << "Good";
        }
        else if (score >= 60)
        {
            cout << "Pass";
        }
        else
        {
            cout << "Fail";
        }
        return 0;
    }
    
    • 1
      @ 2023-3-20 21:35:29
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
          int n;
          cin >> n;
          if(n >= 90)
          {
              cout << "Excellent";
          }
          else if(n >= 80)
          {
              cout << "Good";
          }
          else if(n >= 60)
          {
              cout << "Pass";
          }
          else
          {
              cout << "Fail";
          }
          return 0;
      }
      
      • 1
        @ 2023-2-19 9:42:33
        #include <iostream>:
        using namespace std;
        int main()
        {
            int n;
            cin >> n;
            if(n>=90)
            {
                cout << "Excellent";
            }
            else if(n>=80)
            {
                cout << "Good";
            }
            else if(n>=60)
            {
                cout << "Pass";
            }
            else
            {
                cout << "Fail";
            }
        }
        
        • -1
          @ 2023-4-10 20:53:25
          #include<bits/stdc++.h>
          using namespace std;
          int main()
          {
              int x;
              cin>>x;
              if (x>=90)
                  cout<<"Excellent";
              else if (x>=80)
                  cout<<"Good";
              else if (x>=60)
                  cout<<"Pass";
              else
                  cout<<"Fail";
              return 0;
          }
          • -6
            @ 2023-9-20 13:02:33

            这么简单,我先不做题解了。 (誰都会)

            • 1

            信息

            ID
            956
            时间
            1000ms
            内存
            16MiB
            难度
            1
            标签
            递交数
            83
            已通过
            66
            上传者