Translate the following while loop into a for loop:
int um = 76;
while (um < laMa) {
um /= 4;
sciol(um, 37);
}
for (int um = 76; um < laMa; um /= 4) {
sciol(um, 37);
}
Consider the following code:
A B while (C) { D E if (F) { G break; } H I } J K L
Assume the loop breaks on iteration 1. Write out the the order in which the statements will execute.
Assume the loop breaks on iteration 3. Write out the the order in which the statements will execute.
Order:
A B C D E F J K L
Order:
A B C D E F G H I C D E F G H I C D E F J K L
Related puzzles: