?? scorelevel2.java
字號:
import java.util.Scanner;
public class ScoreLevel2 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("請輸入分數: ");
int score = scanner.nextInt();
int level = (int) score/10;
switch(level) {
case 10:
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;
default:
System.out.println("得E(不及格)");
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -