continue终止循环
时间: 2023-10-23 21:07:13 浏览: 112
continue语句用于在循环中跳过当前迭代,并继续进行下一轮循环。当条件满足时,continue语句将导致程序跳过当前迭代的剩余部分,直接进入下一次循环。这样可以在循环执行过程中提前结束某些特定迭代,而不是完全终止整个循环。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [使用continue跳出本次循环](https://blog.csdn.net/ivenqin/article/details/103815240)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [break与continue在终止循环作用上的区别](https://blog.csdn.net/rogue2009/article/details/83968087)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文