while应用

while应用

一.while+continue

while+contiune是跳过本次循环,开始下一次循环。

image
image

二.while+else

当循环自动运行结束后,else指令运行

image

人为中断循环,不会执行else指令。

image

三.while死循环

死循环会让cpu极度繁忙,甚至崩溃。

image

image

posted @ 2021-11-05 17:02  Zzy的Bk  阅读(96)  评论(0)    收藏  举报