当前位置:网站首页>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 .
边栏推荐
- Five elements of user experience
- The latest activation free version of Omni toolbox
- MySQL timestampdiff interval
- Basic MySQL operations
- [set theory] set concept and relationship (set family | set family examples | multiple sets)
- Interaction free shell programming
- Taking two column waterfall flow as an example, how should we build an array of each column
- 毕设-基于SSM宠物领养中心
- Application of I2C protocol of STM32F103 (read and write EEPROM)
- GFS分布式文件系统(光是遇见已经很美好了)
猜你喜欢

When writing a web project, SmartUpload is used for file upload and new string () is used for transcoding, but in the database, there will still be random codes similar to poker

Bisher - based on SSM pet adoption center

vulnhub HA: Natraj

CVPR 2022 | Dalian Technology propose un cadre d'éclairage auto - étalonné pour l'amélioration de l'image de faible luminosité de la scène réelle

The latest activation free version of Omni toolbox
![[home push IMessage] software installation virtual host rental tothebuddy delay](/img/e7/eb20a773e4b674962f856d179a3769.jpg)
[home push IMessage] software installation virtual host rental tothebuddy delay

CVPR 2022 | Dalian Institute of technology proposes a self calibration lighting framework for low light level image enhancement of real scenes

国产PC系统完成闭环,替代美国软硬件体系的时刻已经到来
![[graduation season · aggressive technology Er] Confessions of workers](/img/ec/4f4d96e22a1029074b07ab80bfa1d9.png)
[graduation season · aggressive technology Er] Confessions of workers

JS realizes the animation effect of text and pictures in the visual area
随机推荐
Nat. Comm. | use tensor cell2cell to deconvolute cell communication with environmental awareness
Analysis of the reason why the server cannot connect remotely
What are the Bluetooth headsets with good sound quality in 2022? Inventory of four high-quality Bluetooth headsets
Deep dive kotlin synergy (20): build flow
eth入门之DAPP
树莓派如何连接WiFi
[set theory] set operation (Union | intersection | disjoint | relative complement | symmetric difference | absolute complement | generalized union | generalized intersection | set operation priority)
【刷题篇】多数元素(超级水王问题)
Introduction to eth
基于Pytorch和RDKit的QSAR模型建立脚本
300+篇文献!一文详解基于Transformer的多模态学习最新进展
What can learning pytorch do?
2022deepbrainchain biweekly report no. 104 (01.16-02.15)
"Final review" 16/32-bit microprocessor (8086) basic register
中移物联网OneOS与OneNET入选《2021年物联网示范项目名单》
重绘和回流
How does the pytorch project run?
SAP ui5 application development tutorial 105 - detailed introduction to the linkage effect implementation of SAP ui5 master detail layout mode
MySQL create table
2022 polymerization process examination questions and polymerization process examination skills