/ Assignment / assignment_14.java
assignment_14.java
 1  /*
 2   * Find largest of 2 numbers
 3   */ 
 4  
 5  import java.util.Scanner; 
 6  
 7  public class assignment_14 {
 8    public static void main(String[] args) {
 9      Scanner sc = new Scanner(System.in);
10  
11      System.out.println("Enter the 2 numbers");
12      int num1 = sc.nextInt();
13      int num2 = sc.nextInt();
14  
15      boolean greater_lesser = num1 > num2; 
16  
17      if(greater_lesser) {
18        System.out.println(num1 + " is the greatest");
19      }
20      else {
21        System.out.println(num2 + " is the greatest");
22      }
23    }
24  }