Examlex

Solved

What Does the Following Code Snippet Print

question 28

Multiple Choice

What does the following code snippet print?
Int a = 120;
Int b = 90;
Int n1 = Math.abs(a) ;
Int n2 = Math.abs(b) ;
Int result = 1;
For (int k = 1; k <= n1 && k <= n2; k++)
{
If (n1 % k == 0 && n2 % k == 0)
{
Result = k;
}
}
System.out.println(result) ;


Definitions:

Discouraged Worker

An individual who is not actively seeking employment due to a belief that no suitable job opportunities exist or they would not find employment.

Retiree

A person who has withdrawn from their profession or occupation and is no longer engaged in paid work.

Age Discrimination

Prejudice or discrimination against individuals or groups based on their age, typically against older adults in employment and other areas.

Job Market

Describes the marketplace where employers search for employees and employees search for jobs.

Related Questions