plzz write the program no 3
Answers
import java.util.*;
public class Greater_no
{
public static void main(String[ ] args)
{
Scanner in=new Scanner(System.in);
int a,b,c;
System.out.println("Enter 3 no:");
a=in.nextInt( );
b=in.nextInt( );
c=in.nextInt( );
if(a==b==c)
{
System.out.println("All no are equal");
}
else
if(a>b&&a<c)
{
System.out.print ln("Greater no="+a);
}
else
if(b>a&&b>c)
{
System.out.print ln("Greater no="+b);
}
else
{
System.out.print ln("Greater no="+c);
}
}
}
import java . util. *;
class check
{
public static void main(String args[])
{
int a,b, c;
Scanner sc=new Scanner(System .in);
a=sc. nextInt();
b=sc. nextInt();
c=sc. nextInt();
if(a==b&&b==c)
Sy stem . out . println("ALL NUMBERS ARE EQUAL");
else
{
if(a>b&&a>c)
Sy stem . out . println(a+"is greater");
if(c>b&&c>a)
Sy stem . out . println(c+"is greater");
if(b>a&&b>c)
Sy stem . out . println(b+"is greater");
}
}
}
n= 14 , 15 , 16
n=15,15,15