Examlex

Solved

Assuming That a User Enters 5 as the Value for Num

question 48

Multiple Choice

Assuming that a user enters 5 as the value for num, what is the output of the following code snippet?
Int num = 0;
Scanner in = new Scanner(System.in) ;
System.out.print("Enter a number: ") ;
Num = in.nextInt() ;
If (num < 50)
{
Num = num + 5;
}
If (num < 10)
{
Num = num - 2;
}
If (num > 5)
{
Num++;
}
Else
{
Num--;
}
System.out.println(num) ;


Definitions:

IFRS

International Financial Reporting Standards, a set of accounting standards developed by the International Accounting Standards Board (IASB) for global use.

U.S. GAAP

Generally Accepted Accounting Principles in the United States, which are a set of accounting standards used for financial reporting.

Norwalk Agreement

An agreement between the Financial Accounting Standards Board (FASB) and the International Accounting Standards Board (IASB) to make their existing financial reporting standards fully compatible as soon as practicable and to coordinate their future work programs to ensure compatibility.

SEC

The Securities and Exchange Commission (SEC) is a U.S. government agency responsible for regulating the securities markets and protecting investors by ensuring transparency, fair dealing, and enforcement of securities laws.

Related Questions