38 lines
No EOL
613 B
C
38 lines
No EOL
613 B
C
int printf(char* format, ...);
|
|
|
|
int main() {
|
|
int i;
|
|
|
|
printf("For loop:\n");
|
|
for (i = 0; i < 5; i++) {
|
|
if (i > 3) {
|
|
continue;
|
|
}
|
|
printf("%d ", i);
|
|
}
|
|
printf("\n");
|
|
|
|
printf("While loop:\n");
|
|
i = 0;
|
|
while (i < 5) {
|
|
if (i > 3) {
|
|
i++;
|
|
continue;
|
|
}
|
|
printf("%d ", i);
|
|
i++;
|
|
}
|
|
printf("\n");
|
|
|
|
printf("Do-while loop:\n");
|
|
i = 0;
|
|
do {
|
|
if (i > 3) {
|
|
i++;
|
|
continue;
|
|
}
|
|
printf("%d ", i);
|
|
i++;
|
|
} while (i < 5);
|
|
printf("\n");
|
|
} |