백준 14681 c++

magicdrill·2024년 4월 10일
0

백준 문제풀이

목록 보기
281/655

백준 14681 c++

#include <iostream>
using namespace std;

int main(void)
{
	int x, y;
	
	cin >> x >> y;

	if ((x >= -1000 && x <= 1000) && (y >= -1000 && y <= 1000) && x != 0 && y != 0)
	{
		if (x > 0 && y > 0)
		{
			cout << "1" << endl;
		}
		else if (x < 0 && y > 0)
		{
			cout << "2" << endl;
		}
		else if (x < 0 && y < 0)
		{
			cout << "3" << endl;
		}
		else
		{
			cout << "4" << endl;
		}
	}
	return 0;
}

0개의 댓글