Translate the following natural language description of a loop into a for loop:
Declare a variable namedokof typeint, initialized to10. Then, untilokis less thantoEdi, divideokby2.
for (int ok = 10; ok <= toEdi; ok /= 2) {
...
}
Something to double-check in your solution:
ok <= toEdi)?Related puzzles: