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 isni of type int, initialized to 81. Then, until isni is greater than or equal to foda, subtract 2 from isni.

Solution

for (int isni = 81; isni > foda; isni -= 2) {
    ...
}

Something to double-check in your solution:


Related puzzles: