/*
#include <stdlib.h>
int main()
{
printf("Hello world!\n");
return 0;
}
*/
/*
#include <stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%.1f",(float)a*b/2);
return 0;
}
*/
/*
#include <stdio.h>
int main()
{
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
printf("%.2f",(float)(a+b+c)/3);
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;
}
*/
/*
#include <stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a!=b);
return 0;
}
산술연산자 + - * / %
비교연산자 > < >= <= == != -> 결과가 논리값( 1 또는 0)
논리연산자 ! && ||
-> 논리값(1또는0)으로만 연산
1 yes true
0 no false
****************
! not 아니다
int a=0;
printf("%d",!a);
*****************
&& and 그리고
퀘스트1. 연필가져오세요 그리고 지우개가져오세요
int a=5;
int b=10;
1 && 0
printf("%d", a==5 && b<0 ); // 0
x y x&&y
0 0 0
0 1 0
1 0 0
1 1 1
**************************
|| or 또는
퀘스트2. 연피가져오세요 또는 지우개가져오세요
int a=5;
int b=10;
1 || 0
printf("%d", a==5 || b<0 ); // 1
x y x||y
0 0 0
0 1 1
1 0 1
1 1 1
*/
/*
#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;
}
*/
/*
#include <stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a||b);
return 0;
}
삼항연산자 (3항연산)
!a 단항연산자 or 1항연산자
a+b a>b a&&b 다항연산자 or 2항연산자
? : 다항연산자 or 3항연산자
< 둘 중 큰수 또는 둘 중 작은 수?를 구할때 > 미니조건문
(조건식) ? ( 조건식이 1일때의 값 ) : ( 조건식이 0일때의 값 )
조건식: 결과가 1 또는 0으로 나오는 식
printf("%d", 123>456 ? 100 : 500 ); // 500
1. 둘 중 큰 수 출력
printf("%d", a>b ? a : b );
2. 둘 중 작은 수 출력
printf("%d", a<b ? a : b );
c = a>b?a:b ; // c에 둘 중 큰 수를 대입하세요
3. 세 수 중에 가장 큰 수 출력
(a b 둘 중 큰 수 ) c 둘 중 큰수 -> 셋 중 가장 큰 수
a>b>c (x)
*/
/*
#include <stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a>b ? a:b);
return 0;
}
*/
/*
#include <stdio.h>
int main()
{
int a,b,c,d;
scanf("%d %d %d",&a,&b,&c);
d = a<b ? a:b;
printf("%d",c<d ? c:d);
return 0;
}
*/
/*
#include <stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d",(a&&!b)||(!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;
}
*/
/*
#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;
}
*/
/*
#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;
}
*/
/*
#include <stdio.h>
int main()
{
int a,b,c,d;
scanf("%d %d %d",&a,&b,&c);
d=a<b ? a:b;
printf("%d",c<d ? c:d);
return 0;
}
*/