Greatest_three_Number in java
package basics;
import java.util.Scanner;
public class Greatest3 {
public static void main(String[] args) {
int a,b,c;
Scanner s = new Scanner(System.in);
System.out.println("enter three numbers");
a = s.nextInt();
b = s.nextInt();
c = s.nextInt();
s.close();
if(a>b && a>c) {
System.out.println(a+" is Greatest");
}
else if(a==b) {
System.out.println("A and B are equal");
}
else if(b==c) {
System.out.println("B and C are equal");
}
else if(b>c) {
System.out.println(b+" is Greatest");
}
else if(a==b && b==c) {
System.out.println("All number are Equal");
}
else {
System.out.println(c+" is Greatest");
}