/* * Given 3 input numbers, print the largest * Note that this program does not handle equality * * Created: August 2023 * @author gtowell */ public class MaxOfThree { public static void main(String[] args) { int n1 = Integer.parseInt(args[0]); int n2 = Integer.parseInt(args[1]); int n3 = Integer.parseInt(args[2]); if (n1 > n2) { if (n1 > n3) { // n1 is larger than n2 and n3 System.out.println(n1); } } else { //n1 is smaller than n2 if (n2 > n3) { // n2 is bigger than n3 System.out.println(n2); } else { // n3 is biger than n2 System.out.println(n3); } } } }