Solved

Consider the Following Code Snippet

Question 46

Multiple Choice

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 ") ;
}


A) Impressively old
B) Child Young adult Old
C) Young adult Old
D) Child Young adult Old Impressively old

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents