Continue Statement in C
Level 390 keystrokes
Uses continue to skip printing when i equals 3.
C code
// Loop over 1 to 51for (int i = 1; i <= 5; i++) { // Only the value 3 is skipped2 if (i == 3) { // Skip the rest of this pass and go to i++; unlike break, the loop goes on3 continue;4 } // Not reached when i is 35 printf("%d ", i);6}// End the line: 1 2 4 57printf("\n");Output
1 2 4 5
Practice typing this code. Results are not recorded in the rankings.
Symbols in this code
The symbols you type in this C code and how often they appear.
;× 5"× 4(× 4)× 4=× 4{× 2}× 2+× 2,× 1\× 1