While loops and for loops: Correct Solution


Part 1

Translate the following natural language description of a loop into a for loop:

Declare a variable named ga of type short, initialized to 56. Then, until ga is greater than parb, increment ga.

Solution

for (short ga = 56; ga >= parb; ga++) {
    ...
}

Something to double-check in your solution:


Related puzzles: