#include <stdio.h>
int main() {
/* 논리 연산자
&& : AND 양쪽 모두 참이면 참
|| : OR 둘 중 하나 이상 참이면 참
! : NOT 참과 거짓을 반대로
C언어에서는 참을 1, 거짓을 0으로 취급한다
*/
int a = 5, b = 10, c = 15;
printf("%d\n", a > 3 && b > 5);
printf("%d\n", a < 3 || c == 15);
printf("%d\n", !(a == 5));
printf("%d\n", a + b && c == 15);
printf("%d\n", !(a + b <= c) && b != 10);
printf("%d\n", a + (b > c));
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: