Q

백준 14681

백준 14681번 문제


C code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdio.h>

int main(void)
{
int x, y;
scanf("%d %d", &x, &y);

if(x != 0 && x >= -1000 && x <= 1000)
{
if(y != 0 && y >= -1000 && y <= 1000)
{
if(x > 0 && y > 0)
printf("1\n");
else if(x < 0 && y > 0)
printf("2\n");
else if(x < 0 && y < 0)
printf("3\n");
else if(x > 0 && y < 0)
printf("4\n");
}
}

return 0;
}