Skip to content

Commit 3a72be3

Browse files
committed
break and continue
1 parent 0dead06 commit 3a72be3

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

break

16.3 KB
Binary file not shown.

break.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include <stdio.h>
2+
3+
int main() {
4+
int i;
5+
6+
for (i = 0; i < 10; i++) {
7+
if (i == 4) {
8+
break;
9+
}
10+
printf("%d\n", i);
11+
}
12+
13+
return 0;
14+
}

continue

16.3 KB
Binary file not shown.

continue.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include <stdio.h>
2+
3+
int main() {
4+
int i;
5+
6+
for (i = 0; i < 10; i++) {
7+
if (i == 4) {
8+
continue;
9+
}
10+
printf("%d\n", i);
11+
}
12+
13+
return 0;
14+
}

0 commit comments

Comments
 (0)