import java.util.Scanner; class S { public static void main(String[] args) { Scanner s= new Scanner(System.in); System.out.println("请输入一个数:"); int score = s.nextInt(); if (score < 0 || score > 100) { System.out.println("不合法"); System.exit(0); } int n = score/10; String grade; switch(n) { case 10: grade ="优秀"; break; case 8: grade ="及格"; break; default: grade ="不及格"; break; } System.out.println(grade); }
by: 发表于:2017-05-25 13:49:13 顶(0) | 踩(0) 回复
??
回复评论