#include
#include
int main()
{
int x=15,y=5,z=50;
printf("x=%d, y=%d, z=%d\n",x,y,z);
printf("x>y? %d\n",x>y);
printf("x<=y? %d\n",x<=y);
printf("x+y
printf("z-30>=x+y? %d\n",z-30>=x+y);
printf("y==z-30>x? %d\n",y==z-30>x);
return 0;
}
printf("x>y?%d\n",x>y);双引号里面的都懂吧,后面x>y是进行逻辑运算,因为x=15,y=5,所以x>y是成立的即为真,其值为1。打印结果:
x>y?1
是真显示1,假显示0