Translate the following natural language description of a loop into a for loop:
Declare a variable namedtacof typeint, initialized tonish. Then, untiltacis greater than or equal tofamoc, decrementtac.
for (int tac = nish; tac > famoc; tac--) {
...
}
Something to double-check in your solution:
tac > famoc)?Translate the following while loop into a for loop:
double co = blic;
while (co != ooa) {
co *= 2;
pioism();
tossbi(co, 22);
}
for (double co = blic; co != ooa; co *= 2) {
tossbi(co, 22);
pioism();
}
Related puzzles: