Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class sample9
- {
- public static Scanner input = new Scanner(System.in);
- public static void main(){
- int num1,num2;
- System.out.print("Enter value of number 1: ");
- num1 = input.nextInt();
- System.out.print("Enter value of number 2: ");
- num2 = input.nextInt();
- if (num1 > num2){
- System.out.print("The first number is greater than the second number");
- } else if(num1<num2) {
- System.out.print("The first number is less than the second number");
- } else {
- System.out.print("The first number is equal to the second number");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement