Computer Science/백준 알고리즘
[백준] 14681번 사분면 고르기 (C/C++)
roytravel
2022. 6. 29. 23:46
#include <iostream>
using namespace std;
int main(void)
{
int X = 0;
int Y = 0;
cin >> X >> Y;
if ((X>=-1000 and X<=1000) and (X!=0) and (Y>=-1000 and Y<=1000) and (Y!=0))
{
if (X>0 and Y>0)
cout << "1" << endl;
if (X<0 and Y>0)
cout << "2" << endl;
if (X<0 and Y<0)
cout << "3" << endl;
if (X>0 and Y<0)
cout << "4" << endl;
}
return 0;
}