Skip to main content

Posts

Showing posts with the label #2. Write a Java program to find maximum between three numbers.

ads1

2. Write a Java program to find maximum between three numbers.

  2. Write a Java program to find maximum between three numbers. Static Solution  :- class max3 {     public static void main(String args[])     {     int no1=10,no2=20,no3=30;         if((no1 > no2) && (no2 > no3))         {             System.out.println("First number is Big :- "+no1);         }         else if(no2 >no3)         {             System.out.println("Second number is Big :- "+no2);         }     else     {         System.out.println("Third number is Big :- "+no3);     }     } }  Output :...

ads2