返回列表 發帖
  1. import java.io.Console;
  2. public class ch08
  3. {
  4.    public static void main (String showdemo[])
  5.    {
  6.     Console console=System.console();
  7.     int score;
  8.     System.out.print("Please input your score =");
  9.     score=Integer.parseInt(console.readLine());

  10.     if (score ==100)
  11.     {
  12.       System.out.println("有作弊嗎?");
  13.     }
  14.     else if(score >=60 && score <100)
  15.     {
  16.       System.out.println("恭喜及格了!!");
  17.     }
  18.     else if (score <60 && score >0)
  19.     {
  20.       System.out.println("成績不及格!!");
  21.     }
  22.     else if (score ==0)
  23.     {
  24.       System.out.println("鴨蛋一個!!!");
  25.     }
  26.       else
  27.     {
  28.       System.out.println("輸入錯誤,你是來亂的嗎?");
  29.     }
  30.    }
  31. }
複製代碼

TOP

返回列表