java program to find largest of three numbers using nested if

Solutions on MaxInterview for java program to find largest of three numbers using nested if by the best coders in the world

showing results for - "java program to find largest of three numbers using nested if"
Chiara
29 Mar 2016
1public class Main{public static void main(String[] args) {double a = 500, b = 1000, c = 1500;if( a >= b && a >= c)System.out.println(a + " largest number");else if (b >= a && b >= c)System.out.println(b + " largest number");elseSystem.out.println(c + " largest number");}}