Advertisement
desislava_topuzakova

04. Greater Number

Mar 25th, 2018
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class LiveDemo {
  4.     public static void main(String[] agrs) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         int num1 = Integer.parseInt(scanner.nextLine());
  8.         int num2 = Integer.parseInt(scanner.nextLine());
  9.  
  10.         if (num1 > num2) {
  11.             System.out.println(num1);
  12.         } else {
  13.             System.out.println(num2);
  14.         }
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement