Question: CRAILE622 Basic if-else expression Reset Write an expression that will cause the following code to print I am a teenager if the value of userAge

 CRAILE622 Basic if-else expression Reset Write an expression that will cause

CRAILE622 Basic if-else expression Reset Write an expression that will cause the following code to print I am a teenager" if the value of userAge is less than 20. 1 import java.util.Scanner; 3 public class AgeChecker f 4 public static void main (String [ args) int userAge; Scanner scnr-new Scanner(System.in); userAge scnr.nextInt); / Program will be tested with values: 18, 19, 20, 21 if Your solution goes here 10 System.out.println("I am an adult") 12 13 14 15 else System.out.printin("I am a teenager") 17 18

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!