返回列表 發帖
本帖最後由 巫沛庭 於 2018-6-5 20:00 編輯
  1. import java.util.Scanner;       
  2. public class JPA02 {
  3.    static Scanner keyboard = new Scanner(System.in);
  4.    public static void main(String[] args)
  5.    {
  6.     test();
  7.     test();
  8.    }
  9.    public static void test()
  10.    {
  11.         int a;
  12.     System.out.println("Please enter score :");
  13.     a=keyboard.nextInt();
  14.     if(a>=60)
  15.     {
  16.       System.out.println("You pass");
  17.     }
  18.     System.out.println("End");
  19.    }
  20.   }
複製代碼

TOP

返回列表