Translate the following while loop into a for loop:
int maur = 9;
while (maur >= suHial) {
maur++;
pher(maur, 18);
}
for (int maur = 9; maur >= suHial; maur++) {
pher(maur, 18);
}
Translate the following natural language description of a loop into a for loop:
Declare a variable namedhuhoof typeint, initialized to36. Then, untilhuhois less than or equal toheCin, subtract4fromhuho.
for (int huho = 36; huho < heCin; huho -= 4) {
...
}
Something to double-check in your solution:
huho < heCin)?Related puzzles: