#include<stdio.h>
// 논리연산자: 참(1)/거짓(0)을 반환하는 연산자
// a && b and연산자: 두 대상이 모두 참일 때 참
// || or연산자: 두 대상 중 하나만 참이면 참
// ! not연산자: 참(0이 아닌 모든 수)->거짓(0), 거짓->참
int main(void)
{
    int num1=10;
    int num2=12;
    int result1, result2, result3;

    result1 = (num1==10 && num2==12); // 1 && 1 -> 1
    result2 = (num1<12 || num2>12); // 1 || 0 -> 1
    result3 = (!num1); // !1 -> 0

    printf("result1: %d \n", result1);
    printf("result2: %d \n", result2);
    printf("result3: %d \n", result3);
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: