Continue
Used to skip the remainder of this loop and go to the next loop to determine if it needs to be executed
1.for (1; 2; 3)
{
A
B
Continue If the statement is executed, execution of the statement 3,c and D will be skipped, and C and D will not be executed.
C
D
}
2.while (expression)
{
A
B
3; //3 must be put in front of continue, not after
Continue If the statement is executed, the expression is executed after the statement is executed, and C and D are skipped, and C and D are not executed.
C
D
}
1 /*2 April 2, 2015 11:49:593 Objective:4 test the use of continue5 6 */7 8# include <stdio.h>9 Ten intMainvoid) One { A inti; - Charch; - thescanf"%d", &i);//input 123m -printf"i =%d\n", i); - - while((Ch=getchar ())! ='\ n')//read extra characters m + Continue; - + intJ; A atscanf"%d", &j);//input -printf"j =%d\n", j); - - return 0; - - } in /* - running the results in VC6.0 is: to ----------------------------- + 123m - i = 123 the - * j = $ -----------------------------Panax Notoginseng Summary: - the */
View Code
The use of 24._continue