Examlex

Solved

What Is the First and Last Value of I to Be

question 18

Multiple Choice

What is the first and last value of i to be displayed by the following code snippet?
Int n = 20;
For (int i = 0; i <= n; i++)
{
For (int j = 0; j <= i; j++)
{
System.out.println("" + i) ;
}
}


Definitions:

Mid-ocean Ridges

Mountainous formations under the sea, created by the shifting of earth's plates, which result in new ocean crust through volcanic processes.

Rising Mantle

The upward movement of the Earth's mantle, often leading to volcanic activity.

Divergent Boundary

A plate-tectonic boundary in which two plates move apart (diverge) relative to one another.

Convergent Boundary

A tectonic plate boundary where two plates move toward each other, often resulting in mountain building, earthquakes, or volcanic activity.

Related Questions