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 ceu of type short, initialized to 7. Then, until ceu is not equal to omLerwe, divide ceu by 4.

Solution

for (short ceu = 7; ceu != omLerwe; ceu /= 4) {
    ...
}

Something to double-check in your solution:


Related puzzles: