import java.util.*;
class Greatest
{
public static void main(String args[])
{
int a,b;
Scanner rd = new Scanner(System.in);
System.out.print("Enter two numbers:");
a = rd.nextInt();
b = rd.nextInt();
if(a>b)
{
System.out.println( a+" "+"is the greatest no.");
}
else
{
System.out.println(b+" "+"is the greatest no.");
}
}
}
Output
Enter two numbers : 15 4040 is the greatest no.
0 Comments