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 sqa of type long, initialized to ud. Then, until sqa is greater than kreka, increment sqa.

Solution

for (long sqa = ud; sqa >= kreka; sqa++) {
    ...
}

Something to double-check in your solution:


Related puzzles: