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:

Attorney-Client Privilege

A legal principle that keeps communications between an attorney and their client confidential.

Securities Laws

Legal provisions that govern the trading, offering, and sale of securities to protect investors and ensure market transparency and fairness.

Securities Exchange Commission

A U.S. government agency that oversees and regulates the securities industry and stock market to protect investors.

Accounting Firm

A business that offers a wide range of accounting services to individuals and companies, including audit, tax preparation, and financial consulting.

Related Questions