Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. import java.util.*;
  2. public class sample9
  3. {
  4. public static Scanner input = new Scanner(System.in);
  5. public static void main(){
  6. int num1,num2;
  7. System.out.print("Enter value of number 1: ");
  8. num1 = input.nextInt();
  9. System.out.print("Enter value of number 2: ");
  10. num2 = input.nextInt();
  11.  
  12. if (num1 > num2){
  13. System.out.print("The first number is greater than the second number");
  14. } else if(num1<num2) {
  15. System.out.print("The first number is less than the second number");
  16. } else {
  17. System.out.print("The first number is equal to the second number");
  18. }
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement