Home >Backend Development >C#.Net Tutorial >What is the function of continue statement in c language
The function of the continue statement in the C language is to end this loop, that is, to skip the unexecuted statements below in the loop body, and then determine whether to execute the loop next time. It should be noted that the continue statement only ends this loop, not the entire loop.
The function of continue is to end this loop, that is, to skip the following unexecuted statements in the loop body, and then make a decision whether to execute the loop next time.
Note:
The continue statement only ends this loop, not the entire loop. continue can only be used in loop statements, that is, it can only be used in for, while and do...while. Otherwise, continue cannot be used in any statement.
Example:
Output result:
请输入您想去的楼层:4 该层不存在, 请重新输入:3 3层开!
Related recommendations: C#.Net development graphic tutorial
The above is the detailed content of What is the function of continue statement in c language. For more information, please follow other related articles on the PHP Chinese website!