StefanTobler

Lesson 11 Activity 3

Sep 25th, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. /*
  2.  * Lesson 11 Coding Activity 3
  3.  * Get two integers from the keyboard and test if they are equal.
  4.  * If they are, print "YES" (without the quotes).
  5. */
  6.  
  7. import java.util.Scanner;
  8. import java.lang.Math;
  9.  
  10.  
  11. class Lesson_11_Activity_Three {  
  12. public static void main(String[] args)
  13.    {
  14.        Scanner scan = new Scanner(System.in);
  15.        
  16.        System.out.println("Enter two whole numbers.");
  17.        
  18.        int x = scan.nextInt();
  19.        int y = scan.nextInt();
  20.        
  21.        if(x == y){
  22.          System.out.println("YES");
  23.          
  24.          scan.close();
  25.        }
  26.     }
  27. }
Add Comment
Please, Sign In to add comment