本帖最後由 巫沛庭 於 2018-6-5 20:00 編輯
- import java.util.Scanner;
- public class JPA02 {
- static Scanner keyboard = new Scanner(System.in);
- public static void main(String[] args)
- {
- test();
- test();
- }
- public static void test()
- {
- int a;
- System.out.println("Please enter score :");
- a=keyboard.nextInt();
- if(a>=60)
- {
- System.out.println("You pass");
- }
- System.out.println("End");
- }
- }
複製代碼 |