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 scre of type int, initialized to ong. Then, until scre is less than or equal to veng, subtract 4 from scre.

Solution

for (int scre = ong; scre < veng; scre -= 4) {
    ...
}

Something to double-check in your solution:


Related puzzles: