Commit a582493
committed
feat: Demonstrate use of 'continue' statement to skip iteration in loop
🧠 Logic:
- A `while` loop prints numbers from 1 to 10.
- When `i == 5`, the loop increments `i` and uses `continue` to skip printing 5.
- All other numbers are printed normally.
- Demonstrates how `continue` skips the rest of the loop body for a specific condition.
Signed-off-by: Somesh diwan <[email protected]>1 parent 68efeb2 commit a582493
1 file changed
+4
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
15 | | - | |
| 14 | + | |
0 commit comments