import java.util.*;
public class Largest
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
int N1,N2,N3;
System.out.println("Enter 3 Numbers");
N1=in.nextInt();
N2=in.nextInt();
N3=in.nextInt();
if(N1>N2&&N1>N3)
System.out.println(N1+" is the Greatest Number");
else if(N2>N1&&N2>N3)
System.out.println(N2+" is the Greatest Number");
else
System.out.println(N3+" is the Greatest Number");
}
}
No comments:
Post a Comment