#include <stdio.h>
int main() {
int a = 1, b = 0;
printf("Logical AND (a && b): %d\n", a
&& b
); printf("Logical OR (a || b): %d\n", a
|| b
); printf("Logical NOT (!a): %d\n", !a
); printf("Logical NOT (!b): %d\n", !b
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKCWludCBhID0gMSwgYiA9IDA7CgkKCXByaW50ZigiTG9naWNhbCBBTkQgKGEgJiYgYik6ICVkXG4iLCBhICYmIGIpOwoJcHJpbnRmKCJMb2dpY2FsIE9SIChhIHx8IGIpOiAlZFxuIiwgYSB8fCBiKTsKCXByaW50ZigiTG9naWNhbCBOT1QgKCFhKTogJWRcbiIsICFhKTsKCXByaW50ZigiTG9naWNhbCBOT1QgKCFiKTogJWRcbiIsICFiKTsKCQoJcmV0dXJuIDA7Cn0=