Codeup.kr/C언어 기초 100제
[Code up 문제] 1059번 비트단위로 NOT 하여 출력하기
Jongung
2021. 9. 6. 21:18
1. 정답 코드
#include <stdio.h>
int main() {
int a;
scanf("%d", &a);
printf("%d", ~a);
}
2. 코드 설명
비트 연산자에서 ~는 bitwise not을 의미하는데 자세한 건 문제에 나와 있으니 확인 하면 된다.