- import java.util.*;
- class JPD02 {
- static Scanner keyboard = new Scanner(System.in);
- public static void main(String[] args) {
- int num = keyboard.nextInt();
- int num2 = keyboard.nextInt();
- test(num,num2);
- num = keyboard.nextInt();
- num2 = keyboard.nextInt();
- test(num,num2);
- }
-
- public static void test(int num,int num2) {
- if(num>num2)
- {
- System.out.printf("%d is larger than %d",num,num2);
- }else if(num<num2)
- {
- System.out.printf("%d is larger than %d",num2,num);
- }
- }
- }
複製代碼 |