import java.util.*;
import java.io.*;
class big
{
public static void main(String args[])throws Exception
{
System.out.println("enter 1st number");
BufferedReader k = new BufferedReader(new InputStreamReader(System.in));
int a= Integer.parseInt(k.readLine());
System.out.println("enter 2nd number");
int b= Integer.parseInt(k.readLine());
System.out.println("enter 3rd number");
int c= Integer.parseInt(k.readLine());
if(a>=b && a>=c)
{
System.out.println(a+" is greater");
}
else if(b>=c && b>=a)
{
System.out.println(b+" is greater");
}
else
{
System.out.println(c+" is greater");
}
}
}
Output:
enter 1st number
3
enter 2nd number
7
enter 3rd number
1
7 is greater
import java.io.*;
class big
{
public static void main(String args[])throws Exception
{
System.out.println("enter 1st number");
BufferedReader k = new BufferedReader(new InputStreamReader(System.in));
int a= Integer.parseInt(k.readLine());
System.out.println("enter 2nd number");
int b= Integer.parseInt(k.readLine());
System.out.println("enter 3rd number");
int c= Integer.parseInt(k.readLine());
if(a>=b && a>=c)
{
System.out.println(a+" is greater");
}
else if(b>=c && b>=a)
{
System.out.println(b+" is greater");
}
else
{
System.out.println(c+" is greater");
}
}
}
Output:
enter 1st number
3
enter 2nd number
7
enter 3rd number
1
7 is greater