public class ScoreQuery {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
int grade = reader.nextInt();
if (grade == 100) {
System.out.println("A等");
} else {
int grade2 = grade / 10;
switch (grade2) {
case 9:
System.out.println("A等");
break;
case 8:
System.out.println("B等");
break;
case 7:
System.out.println("C等");
break;
case 6:
System.out.println("D等");
break;
case 5:
case 4:
case 3:
case 2:
case 1:
case 0:
System.out.println("D等");
break;
default:
System.out.println("输入错误!");
break;
}
}
}
}
|