Translate the following for loop into a while loop:
for (long o = a; o > casde; o++) {
xirSnica(o);
pheCin();
}
long o = a;
while (o > casde) {
o++;
pheCin();
xirSnica(o);
}
Translate the following natural language description of a loop into a for loop:
Declare a variable namedotof typeint, initialized to5. Then, untilotis not equal togauc, divideotby4.
for (int ot = 5; ot != gauc; ot /= 4) {
...
}
Something to double-check in your solution:
ot != gauc)?Related puzzles: