Advertisement
apez1

Term 1: Lesson 13 - Coding Activity 3

Sep 25th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. public class Lesson_13_Activity_Three {
  2.  
  3.     public static void main(String[] args) {
  4.  
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         System.out.println("Input an integer");
  8.         int x = scanner.nextInt();
  9.         System.out.println("Input an integer");
  10.         int y = scanner.nextInt();
  11.  
  12.        
  13.         if(x>y) {
  14.             System.out.println(x);
  15.         }
  16.        
  17.         if(y>x) {
  18.             System.out.println(y);
  19.         }
  20.         if(y==x) {
  21.             System.out.println("EQUAL");
  22.         }
  23.        
  24.        
  25.        
  26.     }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement