/*
#include <stdio.h>
int main()
{
printf("Hello world!\n");
return 0;
}
*/
/*
#include <stdio.h>
int main()
{
long long int a, b;
scanf("%lld %lld",&a, &b);
printf("%lld",a+b);
return 0;
}
산술연산자
+ - * / %
비교연산자
> < >= <= == !=
1. 결과는 0 또는 1로 나온다
맞다 1
아니다 0
a>b a가 b보다 큰가요?
2. >= <= != =을 오른쪽에!!!
a>=b (o)
a=>b (x)
3. == vs =
a==10 (비교) a와 10이 같나요~~?
a=10; (대입) a는 10이야.
진호==10 -> 진호가 10과 같나요~~?
진호=10; -> 이제부터 진호는 10이야.
*/
//#include <stdio.h>
//int main()
//{
// int a, b;
// scanf("%d %d",&a, &b);
// //printf("%d",a+b); // a와 b를 더한 값을 출력해주세요
// printf("%d",a!=b);
// return 0;
//}
/*
#include <stdio.h>
int main()
{
int a, b;
scanf("%d %d",&a, &b);
printf("%d",a>b);
return 0;
}
*/
/*
#include <stdio.h>
int main()
{
int a, b;
scanf("%d %d",&a, &b);
printf("%d",a<=b);
return 0;
}
*/
/*
#include <stdio.h>
int main()
{
int a, b;
scanf("%d %d",&a, &b);
printf("%d",a!=b);
return 0;
}
논리연산
논리값으로만 연산
논리값 : 0또는 1의 값
not !a 아니다 : a가1이면 0 , a가 0이면 1
and a&&b 그리고 : 둘 다 1이면 1
or a||b 또는 : 둘 중하나라도 1이면 1
printf("%d",!1);
printf("%d",!0);
printf("%d",!a);
( 0 ) && ( 0 ) -> 0
( 0 ) && ( 1 ) -> 0
( 1 ) && ( 0 ) -> 0
( 1 ) && ( 1 ) -> 1
printf("%d",a&&b); -> a와 b가 모두 1일때만 결과가 1
ex)
printf("%d", 123>456 && 10==10 );
******************************
( 0 ) || ( 0 ) -> 0
( 0 ) || ( 1 ) -> 1
( 1 ) || ( 0 ) -> 1
( 1 ) || ( 1 ) -> 1
ex)
printf("%d", 123>456 || 10==10 );
a b a&&b !(a&&b)
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0
[기초-논리연산]
1053 ~ 1058
*/
/*
#include <stdio.h>
int main()
{
int a;
scanf("%d", &a);
printf("%d",!a);
return 0;
}
*/
/*
#include <stdio.h>
int main()
{
int a, b;
scanf("%d %d",&a, &b);
printf("%d",a&&b);
return 0;
}
a b !(a&&b) a||b
0 0 1 0 0
0 1 1 1 1
1 0 1 1 1
1 1 0 1 0
*/
/*
#include <stdio.h>
int main()
{
int a, b;
scanf("%d %d",&a, &b);
printf("%d",!a&&b);
return 0;
}
*/
#include <stdio.h>
int main()
{
int a, b;
scanf("%d %d",&a, &b);
printf("%d", !(a&&b) && (a||b));
return 0;
}