Codeup.kr/C언어 기초 100제
[Code up 문제] 1061번 비트단위로 OR 하여 출력하기
Jongung
2021. 9. 7. 19:46
1. 정답 코드
#include <stdio.h>
int main(void) {
int a,b;
scanf("%d %d", &a,&b);
printf("%d", a|b);
}
2. 코드 설명
| 은 bitwise or로 두 비트를 비교해 같은 자리에 1이 있으면 결과 값은 1이되는 연산자이다.