If Else Statement

in Hindi - If Else Statement



not yet

Source Code :

RUNimport java.util.Scanner;

class Ifelse
{
public static void main(String args[])
{
int a, b;
Scanner enter = new Scanner(System.in);

System.out.println("
Enter value of a= ");
a = enter.nextInt();

System.out.println("Enter value of b= ");
b = enter.nextInt();

if(a<b){
System.out.println("a is less than b");     
}     
else if(a==b){
     
System.out.println("a is equal to b");
}
else{
     
System.out.println("a is greater than b");     
}
}
}