- package hi87;
- import java.util.Scanner;
- public class JPA02 {
- static Scanner s=new Scanner(System.in);
-
- public static void main(String[] args) {
- System.out.println("Input:");
- int ss=s.nextInt();
- int mm=s.nextInt();
- if(ss>mm)
- {
- System.out.println(ss+" is larger than "+mm);
- }
- else if(ss<mm)
- {
- System.out.println(mm+" is larger than "+ss);
- }
- else
- {
- System.out.println(ss+" equal "+mm);
- }
- System.out.println("Input:");
- int oo=s.nextInt();
- int pp=s.nextInt();
- if(oo>pp)
- {
- System.out.println(oo+" is larger than "+pp);
- }
- else if(oo<pp)
- {
- System.out.println(pp+" is larger than "+oo);
- }
- else
- {
- System.out.println(oo+" equal "+pp);
- }
- }
- }
複製代碼 |