#include <iostream>

int main() {

    using namespace std;
    
    int x = 4;
    int y = -5;

    if (x >= 1 && y>=1) {
        cout<<"1분면 위치";
        } 

    else if (x<= -1 && y>=1) {
        cout<<"2분면 위치";
        } 

    else if (x<= -1 && y<= -1) {
        cout<<"3분면 위치";
        } 

    else if (x>=1 && y<= -1) {
        cout<<"4분면 위치";
        } 
        
    else  {
        cout<<"선에 걸쳐 있다.";
        } 
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: