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:

Fully Depreciated

An asset's book value is reduced to zero, through depreciation, over its useful life, reflecting that it has no remaining unallocated cost.

Accumulated Depreciation

The total amount of depreciation expense that has been recorded for an asset since it was acquired, reducing its book value.

Remaining Useful Life

The estimated time period that an asset is expected to be functional and economically viable.

Gain on Disposal

The financial profit made from selling or disposing of a fixed asset for more than its book value.

Related Questions