Advertisement
mmayoub

School11, 170910, Ex02

Sep 10th, 2017
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. package myPkg;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Ex02 {
  6.  
  7.     public static void main(String[] args) {
  8.         int x, y;
  9.         Scanner in = new Scanner(System.in);
  10.         System.out.println("Enter two numbers: ");
  11.         x = in.nextInt();
  12.         y = in.nextInt();
  13.  
  14.         if (x > y) {
  15.             System.out.println("the great number is " + x);
  16.         } else {
  17.             System.out.println("the great number is " + y);
  18.         }
  19.  
  20.         in.close();
  21.  
  22.     }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement