iOS training------My C language notes, look forward to communicating with you!
#include <stdio.h>/*break:1.1> switch statement: Exits the entire switch statement 2> loop structure: Exits the entire loop statement * while * does while * for 2. Note Points are only valid for the nearest loop structure Continu E:1. Usage Cycle structure: Ends the current loop body, enters the next loop body * while * does while * for 2. Note Points are only valid for the nearest loop structure*/intMain () {/*for (int i = 0; i<5; i++) {if (i%2) {//I is odd: 1, 3 continue; }} printf ("%d\n", I);*/ //output results; 0 2 4 /*for (int i = 0; i<3; i++) {printf ("Ha ha \ n"); Continue printf ("hahaha 23\n"); }*/ //output results;Ha haha haha ha ha haha for(inti =0; i<3; i++) { for(intj =0; j<2; J + +) { if(j==1) { Break; } printf ("a\n"); } Break; printf ("b\n"); } //output results; A return 0; s}
"Good Programmer's note sharing" C-language break and continue