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 ecsa of type int, initialized to 33. Then, until ecsa is less than psiom, divide ecsa by 4.

Solution

for (int ecsa = 33; ecsa <= psiom; ecsa /= 4) {
    ...
}

Something to double-check in your solution:


Related puzzles: