Checkpoint: skip-and-continue trace
Challenge on lesson: Checkpoint: the continue trap
CHALLENGE
Difficulty: advanced+25 XP
Trace quickly but carefully:
``java
int total = 0;
for (int i = 1; i <= 6; i++) {
if (i % 2 == 0) { continue; }
total += i;
}
System.out.print(total);
``
Return the printed number.
Press Submit to check your solution.
Back to lesson: Checkpoint: the continue trap