当前位置:网站首页>小甲鱼C(第五章循环控制结构程序567)break和continue语句
小甲鱼C(第五章循环控制结构程序567)break和continue语句
2022-07-28 05:28:00 【W.934】
break语句
break语句可以用来从循环体内跳出循环体,即提前结束循环,接着执行循环下面的语句。
一般形式:
break;
break语句不能用于循环语句和switch语句之外的任何其他语句中。
注意:
1)break语句对if-else的条件语句不起作用。
2)在多层循环中,一个break语句只向外跳一层。
continue语句
作用为结束本次循环,即跳过循环体中下面尚未执行的语句,接着进行下一次是否执行循环的判定。
一般形式:
continue;
continue语句和break语句的区别:
continue语句只结束本次循环,而不是终止整个循环的执行。
边栏推荐
- 技术分享 | 接口测试常用代理工具
- DNS正向解析实验
- Custom component -- pure data field & component life cycle
- Pku-2739-sum of constructive prime numbers
- Hdu-1097-a hard puzzle (fast power)
- Which is the best air conduction Bluetooth headset? Air conduction Bluetooth headset ranking
- It is recommended to wear air conduction earphones, which do not need to wear in ear
- DNS forward resolution experiment
- Detailed explanation of LNMP construction process
- Teach you three steps to complete the construction of the test monitoring system hand in hand
猜你喜欢

Use powercli to create a custom esxi ISO image

一、PXE概述和安装

2022 Tanabata gift recommendation! Nice, cheap and practical gift recommendation

Repair the faulty sector

Shell script -- program conditional statements (conditional tests, if statements, case branch statements, echo usage, for loops, while loops)

Compilation and preprocessing of C language

Which is the best and most cost-effective air conduction headset recommended

MySQL master-slave

NFS 共享存储服务

MySQL installation and use
随机推荐
Method of designing test cases
[learning notes] drive
Hdu-1159-commonsubsequence (LCS longest common subsequence)
Repair the faulty sector
Network - data link layer
技术分享 | 接口测试价值与体系
Escape character notes
Esxi community network card driver updated again
Ubuntu18.04+centos7 configure redis master-slave [learning notes]
单项链表的创建、遍历以及按要求查找结点
组管理和权限管理
Wechat applet custom compilation mode
Technology sharing | sending requests using curl
技术分享 | 实战详解接口测试请求方式Get、post
My deployment notes
Build php7 private warehouse
---Stack & queue---
Ubuntu18.04搭建redis集群【学习笔记】
MySQL主从
How to describe a bug and the definition and life cycle of bug level