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 sint of type int, initialized to ro. Then, until sint is less than ueNo, divide sint by 4.

Solution

for (int sint = ro; sint <= ueNo; sint /= 4) {
    ...
}

Something to double-check in your solution:


Related puzzles: