当前位置:网站首页>【day03】流程控制语句
【day03】流程控制语句
2022-07-28 04:01:00 【饮马翰海】
01_流程概述与顺序结构


02_选择结构_单if语句(有或者无)


03_选择结构_标准if-else语句(二者选其一)
这种格式当中,它不会两个都执行的,也不会两个都不执行的,一定是从两种情况当中选择一种进行执行,是两者选其一的。

04_选择结构_扩展if-else语句(N者选其一)
如果都不符合,else做收尾工作

一定是在前一个条件不满足的情况下,我再进行下一个条件的判断。那么它不再是二者选其一,而是n者选其一。
05_练习_用if语句实现考试成绩划分

06_练习_用if语句替换三元运算符
07_选择结构_标准的switch语句


08_选择结构_穿透的switch语句
如果default向上移动,没有break,会发生穿透
09_循环结构_循环概述与基本组成部分
循环是让计算机做一些重复性的东西

10_循环结构_for循环


11_循环结构_while循环



12_循环结构_do-while循环
while小括号后面有一个分号
do-while语句,第一次执行是无条件执行的。不管你的循环条件是多少,我至少执行一次

13_练习_用循环求出1-100之间的偶数和
14_三种循环的区别
15_循环控制_break语句
16_循环控制_continue语句
17_死循环
要想强制停止死循环,按一下Ctrl+C

18_循环嵌套


边栏推荐
- Greedy - 53. Maximum subarray sum
- Jumping game II in question 45 of C language power deduction. Ergodic jump
- [P4] solve the conflict between local file modification and library file
- Skillfully use stack backtracking to help you quickly locate problems
- Appnium--APP自动化测试工具
- pip-script. py‘ is not present Verifying transaction: failed
- 程序人生 | 测试工程师还只会点点点?7个捷径教给你快速学习新技术...
- 7/27(板子)染色法判定二分图+求组合数(递推公式)
- 金仓数据库KingbaseES安全指南--5.2. 数据完整性保护
- [image classification] 2021 MLP mixer nips
猜你喜欢

conda虚拟环境总结与解读
![[leetcode] 34. Find the first and last positions of elements in the sorted array](/img/f0/3eaa33fa7b13abe5f27b136239507d.png)
[leetcode] 34. Find the first and last positions of elements in the sorted array

A 404 page source code imitating win10 blue screen

In depth introduction to sap ui5 fileuploader control - why do you need a hidden iframe trial

Greedy - 53. Maximum subarray sum

C语言:求一个整数存储在内存中的二进制中1的个数

From Clickhouse to Snowflake: MPP query layer

《剑指offer》| 刷题小记

Ch340 RTS DTR pin programming drives OLED
![Error no matching function for call to 'std:: exception:: exception (const char [15])' problem solving](/img/d1/2fbdf42cf60b5382b5a35c64b172b9.png)
Error no matching function for call to 'std:: exception:: exception (const char [15])' problem solving
随机推荐
Leetcode 0141. circular linked list - three solutions
Convert py file to exe executable file
xml文件使用及解析
Un7.27: common commands of redis database.
In depth introduction to sap ui5 fileuploader control - why do you need a hidden iframe trial
security异常处理机制
Leetcode58. Length of the last word
Experience sharing of automatic test for students with monthly salary of 28K
STC timer is abnormal (how to modify the initial value, the timing time is 100ms)
7/27(板子)染色法判定二分图+求组合数(递推公式)
Interview essential skills: SQL query special training!
Protocols in swift
静态博客搭建工具汇总
un7.27:redis数据库常用命令。
基于SSM实现在线租房系统
[MySQL database] index and transaction (often used in interview)
Iterator function operation of iterator learning
Greed 45. Jumping game II
[prototype and prototype chain] get to know prototype and prototype chain~
Do Netease and Baidu have their own tricks for seizing the beach AI learning machine?