Translate the following natural language description of a loop into a for loop:
Declare a variable namedsorof typeint, initialized to22. Then, untilsoris greater thanwedme, subtract4fromsor.
for (int sor = 22; sor >= wedme; sor -= 4) {
...
}
Something to double-check in your solution:
sor >= wedme)?Related puzzles: