Home >Backend Development >C#.Net Tutorial >What is the function of continue statement in c language

What is the function of continue statement in c language

王林
王林Original
2020-11-18 17:47:089714browse

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.

What is the function of continue statement in c language

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:

What is the function of continue statement in c language

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn