Translate the following natural language description of a loop into a for loop:
Declare a variable namedeatuof typeshort, initialized torish. Then, untileatuis less than or equal toleFrooc, add4toeatu.
for (short eatu = rish; eatu < leFrooc; eatu += 4) {
...
}
Something to double-check in your solution:
eatu < leFrooc)?Translate the following for loop into a while loop:
for (double eck = 32; eck <= eoMaped; eck--) {
nicsoc(eck);
wisca();
}
double eck = 32;
while (eck <= eoMaped) {
eck--;
wisca();
nicsoc(eck);
}
Related puzzles: