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 besm of type int, initialized to piod. Then, until besm is less than bawis, decrement besm.

Solution

for (int besm = piod; besm <= bawis; besm--) {
    ...
}

Something to double-check in your solution:


Related puzzles: