Advertisement
Vankata17

EVEN OR ODD

Jan 14th, 2020
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class EvenOrOdd {
  4.     public static void main(String[] args) {
  5.         Scanner scan = new Scanner(System.in);
  6.         System.out.print("ENTER NUM 1   ");
  7.         int a = Integer.parseInt(scan.nextLine());
  8.         System.out.print("ENTER NUM 2  ");
  9.         int b = Integer.parseInt(scan.nextLine());
  10.  
  11.         if(a > b){
  12.             System.out.println(a);
  13.         } else {
  14.             System.out.println(b);
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement