当前位置:网站首页>关于if(x)和while(x)的解释
关于if(x)和while(x)的解释
2022-08-11 05:25:00 【Archimedes' boat】
if(x)就等价于if(x!=0)则执行语句,否则会跳出语句:
int x = 0,a;
if(x)
a=7;
else
a=9;
此时输出a,a=9。
if(!x)相反,等价于if(x==0)则执行语句,否则会跳出语句:
int x1=1,x2=1,a;
if(!x1)
a=5;
else if(x2)
a=7;
else a=9;
此时输出a,a=7。
while(x)则是当x>=0时候继续。
边栏推荐
猜你喜欢
The selection points you need to know about the helmet identification system
LAGRANGIAN FLUID SIMULATION WITH CONTINUOUS CONVOLUTIONS
Reconstruction and Synthesis of Lidar Point Clouds of Spray
CMT2380F32模块开发2-IDE软件配置
安全帽识别系统
Hard hat recognition algorithm
AI智能图像识别的工作原理及行业应用
张小龙的微信公开课(2019年)
CMT2380F32模块开发1-硬件
2022年最新安全帽佩戴识别系统
随机推荐
Asp doNet Mvc4绑定js脚本用法
LiDAR Snowfall Simulation for Robust 3D Object Detection
Solutions to the 7th Jimei University Programming Contest (Individual Contest)
SCNet:Semantic Consistency Networks for 3D Object Detection
自定义形状seekbar学习
KANO模型——确定需求优先级的神器
梅科尔工作室-HarmonyOS应用开发第四次培训
STM32学习笔记(白话文理解版)—按键控制
Hard hat recognition algorithm
珍爱网App竞品分析报告
CMT2380F32模块开发1-硬件
HTTP缓存机制详解
Safety helmet identification system - escort for safe production
梅科尔工作室-Pr第一次培训笔记(安装及项目创建)
红外线应用-红外遥控
The selection points you need to know about the helmet identification system
梅科尔工作室-HarmonyOS应用开发第三次培训
CMT2380F32模块开发8-Base Timer例程
产品经理人物推荐
CMT2380F32模块开发7-reset例程