Java Program to Calculate Largest Number

Here is a simple Java Program to Calculate Largest Number…

class largest
{
    public static void main(int a,int b,int c)
    {
        if (a>b)
        {
            if (a>c)
            {
                System.out.println(“The Largest No is:”+a);
                //break;
            }
            else
            System.out.println(“The Largest No is:”+c);
            //break;
        }
   
    else if (b>c)
    {
        System.out.println(“The Largest No is:”+b);
        //break;
    }
    else
    {
        System.out.println(“The Largest No is:”+c);
    }
    }
}

Add Comment