//实例2 关系和逻辑运算
#include <stdio.h>
void main()
{
int logic;
int a = 1;
int b = 2;
int c = 3;
logic = a + b > c && b <= c;//首先计算a+b是3不大于c,为假,就不会计算后面了,输出0
printf("logic = %d\n", logic);
logic = a >= b + c || b == c;//b+c是5,a是小于5的,为假;输出0
printf("logic = %d\n", logic);
logic = !(a < c) + b != 1&& (a + c)/2;//1与上2为1
printf("logic = %d\n", logic);
}