source:
CIVL/mods/dev.civl.abc/examples/c/switchloop.c
| Last change on this file was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 328 bytes | |
| Line | |
|---|---|
| 1 | int x = 0; |
| 2 | int main() { |
| 3 | while (x<10) { |
| 4 | switch(x) { |
| 5 | case 1: while (x>5) { |
| 6 | x--; |
| 7 | if (x == 2) break; |
| 8 | } |
| 9 | continue; |
| 10 | case 2: while (x<7) { |
| 11 | x++; |
| 12 | if (x == 3) continue; |
| 13 | } |
| 14 | break; |
| 15 | default: x=42; |
| 16 | } |
| 17 | x = 17; |
| 18 | } |
| 19 | } |
Note:
See TracBrowser
for help on using the repository browser.
