- import java.util.Scanner;
- public class JPA02 {
- static Scanner keyboard = new Scanner(System.in);
-
- public static void main(String[] args) {
- int s;
- System.out.println("Please enter score:");
- s=keyboard.nextInt();
- test(s);
- System.out.println("Please enter score:");
- s=keyboard.nextInt();
- test(s);
- }
-
- public static void test(int s) {
- if(s>=60)
- System.out.println("You pass");
- System.out.println("End");
- }
- }
複製代碼 |