Advertisement
adibahbab4108

C211009-ADIB

Oct 27th, 2021
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int x,y;
  7.     cin>>x>>y;
  8.     if(x == 0 && y == 0)
  9.     {
  10.         cout<<"Origin";
  11.     }
  12.     else if(y > 0 && x > 0)
  13.     {
  14.         cout<<"Q1";
  15.     }
  16.     else if(x < 0 && y < 0)
  17.     {
  18.         cout<<"Q3";
  19.     }
  20.     else if(y < 0 && x > 0)
  21.     {
  22.         cout<<"Q4";
  23.     }
  24.     else if(x < 0 && y > 0)
  25.     {
  26.         cout<<"Q2";
  27.     }
  28.  
  29.  
  30.     return 0;
  31. }
  32.  
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement