当前位置:网站首页>220214c language learning diary
220214c language learning diary
2022-07-03 04:16:00 【siecle】
One , Logical operators
&& and ||
Be careful , They are binocular operators , Cannot be used as
a && b && c
or a || b || c
Two ,switch and break
switch It can be used to replace some In the same if There are statement blocks with different results
Such as :if(a = 0)
puts(" frigging awesome ");
if (a = 1)
puts(" Horseshoe ")
if (a = 2)
puts(" People force ")
It can be replaced by :
switch(a){
case 0 : puts(" frigging awesome "); break;
case 1 : puts(" Horseshoe "); break;
case 2 : puts(" People force "); break;
default : puts(" Please enter 0 or 1 or 2, There is no other force .”)
}
It can make the statement more concise , Easy to read .
Blue (a): yes switch Expression of function , Remember to follow the curly braces to indicate the scope
purple case 0: yes “ label ”, This number is an expression (a) Results in . in addition ,case There must be a space before the next number .
gray default: When the expected value is not entered , Automatically run this statement .
Add , Don't forget it. case Add... At the end of the statement break; Otherwise, the program will be executed automatically when it runs break The next statement after .
边栏推荐
- leetcode:297. 二叉树的序列化与反序列化
- RSRS指标择时及大小盘轮动
- [brush questions] connected with rainwater (one dimension)
- Export of zip file
- 有监督预训练!文本生成又一探索!
- Is it better to speculate in the short term or the medium and long term? Comparative analysis of differences
- eth入门之DAPP
- 2022 tea master (intermediate) examination questions and analysis and tea master (intermediate) practical examination video
- The latest analysis of the main principals of hazardous chemical business units in 2022 and the simulated examination questions of the main principals of hazardous chemical business units
- 服务器无法远程连接原因分析
猜你喜欢

Nat. Comm. | 使用Tensor-cell2cell对细胞通讯进行环境感知去卷积
![[文献阅读] Sparsity in Deep Learning: Pruning and growth for efficient inference and training in NN](/img/7e/50fa6f65b5a4f0bb60909f57daff56.png)
[文献阅读] Sparsity in Deep Learning: Pruning and growth for efficient inference and training in NN

Nat. Comm. | use tensor cell2cell to deconvolute cell communication with environmental awareness

300+篇文献!一文详解基于Transformer的多模态学习最新进展

Daily question - ugly number

China Mobile Internet of things oneos and onenet were selected in the list of 2021 Internet of things demonstration projects

What is pytorch? Is pytorch a software?

【刷题篇】多数元素(超级水王问题)

SAP ui5 application development tutorial 105 - detailed introduction to the linkage effect implementation of SAP ui5 master detail layout mode

Which code editor is easy to use? Code editing software recommendation
随机推荐
2022 polymerization process examination questions and polymerization process examination skills
eth入门之DAPP
[brush questions] find the number pair distance with the smallest K
Pdf editing tool movavi pdfchef 2022 direct download
How does the pytorch project run?
[文献阅读] Sparsity in Deep Learning: Pruning and growth for efficient inference and training in NN
[set theory] set operation (Union | intersection | disjoint | relative complement | symmetric difference | absolute complement | generalized union | generalized intersection | set operation priority)
leetcode:297. Serialization and deserialization of binary tree
2022 electrician (Advanced) examination papers and electrician (Advanced) examination skills
[set theory] ordered pair (ordered pair | ordered triple | ordered n ancestor)
Taking two column waterfall flow as an example, how should we build an array of each column
In Net 6 project using startup cs
The 10th China Cloud Computing Conference · China Station: looking forward to the trend of science and technology in the next decade
eth入门之简介
Reflection and planning of a sophomore majoring in electronic information engineering
Social phobia of contemporary young people (III)
[daily question] dichotomy - find a single dog (Bushi)
深潜Kotlin协程(二十):构建 Flow
JS实现图片懒加载
The time has come for the domestic PC system to complete the closed loop and replace the American software and hardware system