- import java.io.Console;
- public class ch08
- {
- public static void main (String showdemo[])
- {
- Console console=System.console();
- int score;
- System.out.print("Please input your score =");
- score=Integer.parseInt(console.readLine());
- if (score ==100)
- {
- System.out.println("有作弊嗎?");
- }
- else if(score >=60 && score <100)
- {
- System.out.println("恭喜及格了!!");
- }
- else if (score <60 && score >0)
- {
- System.out.println("成績不及格!!");
- }
- else if (score ==0)
- {
- System.out.println("鴨蛋一個!!!");
- }
- else
- {
- System.out.println("輸入錯誤,你是來亂的嗎?");
- }
- }
- }
複製代碼 |