break:跳出循环
continue: 跳过本次循环,继续下一次循环
示例: int i; for(i=1;i<9;i++){ if(i%3==0){ // break;//跳出循环 continue; } printf("%d\t",i); }
|
break时输出:1,2,
continue时输出:1,2,4,5,7,8
break:跳出循环
continue: 跳过本次循环,继续下一次循环
示例: int i; for(i=1;i<9;i++){ if(i%3==0){ // break;//跳出循环 continue; } printf("%d\t",i); }
|
break时输出:1,2,
continue时输出:1,2,4,5,7,8