Codeup.kr/C언어 기초 100제
[Code up 문제] 1055번 하나라도 참이면 참 출력하기
Jongung
2021. 9. 6. 20:47
1. 정답 코드
#include <stdio.h>
int main() {
int a, b;
scanf("%d %d", &a, &b);
printf("%d", a||b);
}
2. 코드 설명
and연산자와 반대로 or연산자는 ||를 사용한다. 이번 문제는 or연산자를 사용하는 문제이다.