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!") ;
}
A) Teen!
B) Young!
C) Adult!
D) Old!
Correct Answer:
Verified
Q54: Which of the following expressions represents a
Q55: What is the value of the price
Q56: Assuming that a user enters 64 as
Q57: Consider the following code snippet: boolean attendance
Q58: Consider the following code snippet. Assuming that
Q61: A store applies a 15 percent service
Q62: What is the output of the following
Q63: Which of the following options correctly represents
Q64: Consider the following code snippet:
Int score =
Q93: Which of the following variables is used
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents