首页 > 其他分享 >进一步的判断与循环

进一步的判断与循环

时间:2023-02-21 23:46:29浏览次数:25  
标签:逗号 判断 运算符 循环 bool 进一步 include true

 

 

 1 #include<stdio.h>
 2 #include<stdbool.h>
 3 main()
 4 {
 5     bool b = 6>5;
 6     bool c = true;
 7     c = 4;//bool类型里非0数都是true,都会输出1 
 8     printf("b=%d,c=%d",b,c);
 9     return 0;
10 }

 

 

逻辑运算

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 三目运算符(尽量少用)和逗号运算符

 

 

 

 

 

 逗号运算符

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 多路分支

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

标签:逗号,判断,运算符,循环,bool,进一步,include,true
From: https://www.cnblogs.com/zaiyewujiang/p/17136647.html

相关文章