Bench Lab · spring preview 2 of 3

A look at the spring

Spring preview: a for loop that counts down. The first line makes a box, sets the condition and says how the box changes after each pass. No credit code here: this is a look ahead.

Job 1. Count down

Fill a row each time a line inside the loop runs, and once for line 5.

for (int i = 3; i > 0; i--)
{
System.out.print(i + " ");
}
System.out.println("go");
LineOutput
3

Write the value in each box after the line runs. Leave a box empty if nothing is stored in it yet, and the Output box empty if the line prints nothing.