/*
============================================================================
Name : TestVariable.c
Author : lf
Version :
Copyright : Your copyright notice
Description : break和continue
============================================================================
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(void) {
testBreakAndContinue();
return EXIT_SUCCESS;
}
void testBreakAndContinue() {
int i;
for (i = 0; i < 10; i++) {
if (i == 5) {
break;
}
printf("i=%d\n", i);
}
printf("================\n");
int j;
for (j = 0; j < 10; j++) {
if (j == 5) {
continue;
}
printf("j=%d\n", j);
}
}