2.11-逻辑运算
来源:互联网 发布:大众软件 pdf 编辑:程序博客网 时间:2024/06/13 05:48
#include <stdio.h>
int main()
{
//逻辑与条件1 && 条件2
// int a = 10>3 && 7<6;
//int a = 0 && 10;
//printf("a=%d\n", a);
/*
int a = 10;
int b = 10;
//int c = (a>5) && (++b>=11);
int c = (a<5) && (++b>=11);
// a = 10
// b = 10
// c = 0
printf("a=%d, b=%d, c=%d\n", a, b, c);*/
// 逻辑或 条件1 || 条件2
//int a = 0 || 11;
/*
int a = 10;
int b = 10;
int c = (a<5) || (b++ - 10);
// a = 10
// b = 11
// c = 0
printf("a=%d, b=%d, c=%d\n", a, b, c);*/
// 逻辑非 !条件
//如果条件成立,就返回0;如果条件不成立,就返回1
//int a = !(10>8);
//int a = !-10;
//int a = !10>8;
/*
int a = !!10;
printf("a=%d\n", a);
*/
return 0;
}
- 2.11-逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- iOS中的一些小知识点
- UI____UIEvent以及响应者链
- 美国“懒人经济”风生水起
- NSOperation - 02
- Android 控件开发之Button
- 2.11-逻辑运算
- hadoop深入研究:(二)——java访问hdfs
- NYOJ —水池数目
- HDOJ 1232 畅通工程 (并查集)
- Android4.0强制横屏竖屏
- [iOS/Swift]String的 toInt() 和 integerValue 的区别
- 2.12-三目运算符
- signal(SIGPIPE, SIG_IGN)
- android界面响应事件