Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Feb 24th, 2018 59 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package BASICJAVA;
  7.  
  8. import java.util.Scanner;
  9.  
  10. /**
  11.  *
  12.  * @author ABIR
  13.  */
  14. public class First_Number_Second_Number__Equal_Comparision {
  15.     public static void main(String[]args){
  16.         Scanner abir =new Scanner(System.in);
  17.         System.out.println("Enter your first number");
  18.         int number1=abir.nextInt();
  19.         System.out.println("Enter your second number");
  20.         int number2=abir.nextInt();
  21.         if(number1>number2){
  22.             System.out.println("first is greater");
  23.         }else if(number1<number2) {
  24.             System.out.println("second is greater");
  25.         }else{
  26.             System.out.println("the numbers are equal");
  27.         }
  28.        
  29.     }
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top