- 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,b;
- System.out.println("Input :");
- a=keyboard.nextInt();
- b=keyboard.nextInt();
- if(a>b)
- {
- System.out.println(a+" is larger than "+b);
- }
- else if(a<b)
- {
- System.out.println(b+" is larger than "+a);
- }
- else if(a==b)
- {
- System.out.println(a+"equal"+b);
- }
- }
- }
複製代碼 |