返回列表 發帖
  1. import java.util.*;
  2. class JPD02 {
  3.     static Scanner keyboard = new Scanner(System.in);
  4.     public static void main(String[] args) {
  5.         test();
  6.         test();
  7.     }
  8.    
  9.     public static void test() {
  10.             System.out.println("Input:");
  11.         int i = keyboard.nextInt();
  12.         int h = keyboard.nextInt();
  13.         if(i>h)
  14.         {
  15.                 System.out.printf("%d is lager than %d\n",i,h);
  16.         }
  17.         else if(i<h)
  18.         {
  19.                 System.out.printf("%d is lager than %d\n",h,i);
  20.         }
  21.     }
  22.    
  23. }
複製代碼

TOP

返回列表