当前位置:网站首页>[embedded C foundation] Part 7: detailed introduction to C language process control
[embedded C foundation] Part 7: detailed introduction to C language process control
2022-07-28 13:01:00 【Black cat senior】
1 Sequential structure
Program -> main The first sentence of the function begins -> Execute to main End of the function
The program is executed down in sequence
2 Branch statement
2.1 if Branch
use if Branch , The same type of data wants to execute different code using if Branch
Three types of :
1、 Simple branches :
if (A)
{
B;
}
else
{
C;
}
Be careful :
1.if Able to disengage else Use alone , but else Can't get away from if Use alone
2.if After can add judgment conditions ,else No judgment conditions can be added after
3. If you don't enlarge the parentheses ,if It can control a statement block by default , But in the project if No matter how many sentences of code you control, you need to add parentheses
practice :
Input two numbers from the terminal to a and b, Compare ab Value , If a > b Direct output a, If a No more than b take ab Output after exchange a.
边栏推荐
- Uniapp 应用开机自启插件 Ba-Autoboot
- 【嵌入式C基础】第4篇:运算符的使用
- Remove the plug-in of category in WordPress link
- 机器学习实战-集成学习-23
- Detailed explanation of the usage of C # static
- STM32F103 several special pins are used as ordinary io. Precautions and data loss of backup register 1,2
- Change the document type in endnode and import it in word
- 20220728 common methods of object class
- LeetCode 42.接雨水
- 线性分类器(CCF20200901)
猜你喜欢

Introduction to border border attribute

How to view win11 system and reserved space?

Li FuPan: application practice of kata safety container in ant group

Xampp Chinese tutorial guide

Monotonic stack

Zurich Federal Institute of technology | reference based image super resolution with deformable attention transformer (eccv2022))
![[June 28 event preview] low code Summit](/img/ba/2f35306ed2fb0ece14d704256d8e60.png)
[June 28 event preview] low code Summit

如何在 TiDB Cloud 上使用 Databricks 进行数据分析 | TiDB Cloud 使用指南

VS code更新后不在原来位置
![[embedded explanation] key scanning based on finite state machine and stm32](/img/ce/cc3f959a4e4f5b22e2c711ea887ad7.png)
[embedded explanation] key scanning based on finite state machine and stm32
随机推荐
LeetCode每日一题(2196. Create Binary Tree From Descriptions)
黑猫带你学eMMC协议第26篇:eMMC的硬件复位操作(H/W reset)
Databinding+LiveData轻松实现无重启换肤
Summary: idea problem record
Science heavyweight: AI design protein has made another breakthrough, and it can design specific functional proteins
Vs code is not in its original position after being updated
Science 重磅:AI设计蛋白质再获突破,可设计特定功能性蛋白质
How to use databricks for data analysis on tidb cloud | tidb cloud User Guide
MySQL is always installed unsuccessfully. Just do it like this
Kotlin是如何帮助你避免内存泄漏的?
Siemens docking Leuze BPS_ 304i notes
归并排序
Fundamentals of machine learning Bayesian analysis-14
Ruan Bonan of Green Alliance Technology: cloud native security from the open source shooting range
Machine learning practice - neural network-21
机器学习实战-决策树-22
20220728 common methods of object class
Interface control telerik UI for WPF - how to use radspreadsheet to record or comment
FutureWarning: Indexing with multiple keys (implicitly converted to a tuple of keys) will be depreca
Android工程师,如何使用Kotlin提供生产力?