JAVA RECORD PROGRAM TO FIND BIGGEST OF THREE NUMBERS

 class Biggest

{

  public static void main (String[]args)

  {

   int num1 = 10, num2 = 20, num3 = 30;

    if (num1 >= num2 && num1 >= num3)

        System.out.println (num1 + " is the greatest");

   else if (num2 >= num1 && num2 >= num3)

        System.out.println (num2 + " is the greatest");

    else if (num3 >= num1 && num3 >= num2)

        System.out.println (num3 + " is the greatest");

  }

}

Comments

Popular posts from this blog

JAVA RECORD PROGRAM FOR AREA AND PERIMETER OF RECTANGLE

JAVA RECORD PROGRAM TO UNDERSTAND EXCEPTION HANDLING

JAVA PROGRAM TO PERFORM MULTI THREADING USING RUNNABLE INTERFACE