//wap to find the greatest number among three IN JAVA program,in c,c++
//wap to find the greatest number among three
import java.util.Scanner;
class greater
{
	public static void main(String[] arg)
	{
		Scanner sc=new Scanner(System.in);
		System.out.println("Enter first number ");
		int a=sc.nextInt();
		System.out.println("Enter second number ");
		int b=sc.nextInt();
		System.out.println("Enter third number ");
		int c=sc.nextInt();
		if(a>b)
		{
			if(a>c)
			{
				System.out.println("A IS GREATER");
			}
			else
				System.out.println("C IS GREATER ");
}
		else if(b>c)
			System.out.println("B IS GREATER");	
		else 
		System.out.println("C IS greater");
		}
}
H
ReplyDelete