Translate the following natural language description of a loop into a for loop:
Declare a variable nameduof typeint, initialized tohe. Then, untiluis greater thancerio, incrementu.
for (int u = he; u >= cerio; u++) {
...
}
Something to double-check in your solution:
u >= cerio)?Translate the following for loop into a while loop:
for (double bre = dou; bre >= anChong; bre++) {
ecra(bre);
}
double bre = dou;
while (bre >= anChong) {
bre++;
ecra(bre);
}
Related puzzles: