Consider the following code snippet. Assuming that the user inputs 75 as the age, what is the output? int age = 0; Scanner in = new Scanner(System.in); System.out.print("Please enter your age: "); age = in.nextInt(); if (age < 10) { System.out.print("Child "); } if (age < 30) { System.out.print("Young adult "); } if (age < 70) { System.out.print("Old "); } if (age < 100) { System.out.print("Impressively old "); }

Respuesta :

ijeggs

Answer:

Impressively old

Explanation:

The following code uses multiple if statements to check a user's age. It displays a corresponding information according to the range of age that is entered. In the question scenario given, when a user enters an age of 75, this  is only fufilled in the last conditional block if (age<100) So the code block following System.out.print("Impressively old ") will be executed.

ACCESS MORE