Consider the following code:
A B C while (D) { E F if (G) { H break; } I } J
Assume the loop breaks on iteration 1. Write out the the order in which the statements will execute.
Assume the loop breaks on iteration 4. Write out the the order in which the statements will execute.
Order:
A B C D E F G J
Order:
A B C D E F G H I D E F G H I D E F G H I D E F G J
Translate the following while loop into a for loop:
short goed = cec;
while (goed < poUdeis) {
goed--;
loont(goed, 39);
entEcang();
}
for (short goed = cec; goed < poUdeis; goed--) {
entEcang();
loont(goed, 39);
}
Related puzzles: