Advertisement
alaminrifat

URI -1041 with C++

Apr 11th, 2020
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include<iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     float x,y;
  8.     cin>>x>>y;
  9.     if(x>0 && y>0)
  10.         cout<<"Q1"<<endl;
  11.     else if (x<0 && y > 0)
  12.         cout<<"Q2"<<endl;
  13.     else if (x<0 && y<0)
  14.         cout<<"Q3"<<endl;
  15.     else if(x > 0 and y < 0)
  16.         cout<<"Q4"<<endl;
  17.     else if(x==0 && y==0)
  18.         cout<<"Origem"<<endl;
  19.     else if (x==0)
  20.         cout<<"Eixo Y"<<endl;
  21.     else if (y==0)
  22.         cout<<"Eixo X"<<endl;
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement