import java.util.Scanner;
public class Level {
public static void main(String[] args){
//int scor =88;
//int quotient = scor/10;
//char level;
Scanner scanner = new Scanner(System.in);
System.out.println("Please type score: ");
int score = scanner.nextInt();
int quotient = score /10;
char level;
switch(quotient){
case 10:
case 9:
level = 'A';
break;
case 8:
level = 'B';
break;
case 7:
level = 'C';
break;
case 6:
level = 'D';
break;
default:
level = 'E';
break;
}
System.out.printf("成績為%c%n",level);
}
}
留言
張貼留言