Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Java program to find largest of three numbers using nested if

public 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");}}
Source by inlarn.com #
 
PREVIOUS NEXT
Tagged: #Java #program #find #largest #numbers #nested
ADD COMMENT
Topic
Name
6+6 =