write a program to take two number as input from the user and find the greater number
Answers
Answered by
4
import java.util.*;
class great
{
public static void main(String args[ ])
{
Scanner sc=new Scanner(System.in);
int a,b;
System.out.println("Enter two numbers");
a=sc.nextInt();
b=sc.nextInt();
if(a>b)
{
System.out println(" The greater number is="+a);
}
else
{
System.out.println("The greater number is="+b);
}
}
}
Similar questions