Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

largest of the three no.

public class HelloWorld{

     public static void main(String []args){
        int num1 = 70;
        int num2 = 30;
        int num3 = 40;
        if (num1 > num2 && num1 > num3)
         System.out.println("num 1 is the largest ");
        else if 
             (num2 > num1 && num2 > num3)
         System.out.println("num 2 is the largest ");
        
        else if  (num3 > num1 && num3 > num2)
         System.out.println("num 3 is the largest ");
        
         
     }
     
}

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.