Skip to content

Commit e5a2d1a

Browse files
authored
Fix infinite loop in 12.4 Continue (#104)
1 parent 8e6edaf commit e5a2d1a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/loops/continue.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The only other situation this will not happen is if a `continue` statement is re
1010
int x = 5;
1111
while (x > 0) {
1212
if (x == 4) {
13+
x--; // Make sure the loop continues to 3
1314
continue;
1415
}
1516
IO.println(x + " is a good number");

0 commit comments

Comments
 (0)