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

TOP

返回列表