Examlex

Solved

Assuming That a User Enters 56 for Age, What Is

question 58

Multiple Choice

Assuming that a user enters 56 for age, what is the output of the following code snippet?
Int age = 0;
Scanner in = new Scanner(System.in) ;
System.out.print("Please enter your age: ") ;
Age = in.nextInt() ;
If (age < 13)
{
System.out.println("Kid!") ;
}
If (age >= 13 && age < 19)
{
System.out.println("Teen!") ;
}
If (age >= 19 && age < 30)
{
System.out.println("Young!") ;
}
If (age >= 30 && age < 50)
{
System.out.println("Adult!") ;
}
If (age >= 50)
{
System.out.println("Old!") ;
}


Definitions:

Proofreading Quickly

The process of rapidly reviewing a text for errors in grammar, spelling, and punctuation before finalizing it for publication or submission.

One Read-through

The act of reading a piece of text from beginning to end with no interruptions.

Serif Typeface

A font style characterized by small lines or strokes attached to the ends of letters, enhancing readability in print.

Ventral Surface

The front or belly side of the body or an organ.

Related Questions