import java.util.*;

public class score1 {
    public static void main(String[] args) {
        int score;
        System.out.println("请输入学生的成绩:");
        Scanner input = new Scanner(System.in);
        score = input.nextInt();
        if (score >= 0 && score <= 100) {

            int k = score / 10;
            switch (k) {
            case 10:
                System.out.println("该学生的成绩为优秀");
                break;
            case 9:
                System.out.println("该学生的成绩为优秀");
                break;
            case 8:
                System.out.println("该学生的成绩为良好");
                break;
            case 7:
                System.out.println("该学生的成绩为中等");
                break;
            case 6:
                System.out.println("该学生的成绩为及格");
                break;
            default:
                System.out.println("该学生的成绩为不及格");
            }

        }

    }
}

 

相关文章:

  • 2022-01-19
  • 2021-07-08
  • 2021-08-21
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
猜你喜欢
  • 2021-06-28
  • 2021-06-22
  • 2021-09-03
  • 2022-12-23
  • 2021-11-29
  • 2021-11-06
相关资源
相似解决方案