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 beur of type int, initialized to e. Then, until beur is greater than or equal to alAem, decrement beur.

Solution

for (int beur = e; beur > alAem; beur--) {
    ...
}

Something to double-check in your solution:


Related puzzles: