Advertisement
Sohila_Elshiref

problem Q

Dec 5th, 2022
644
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.87 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <bits/stdc++.h>
  4. #include <cmath>
  5. using namespace std;
  6.  
  7. #define ll long long
  8.  
  9. void Aror()
  10. {
  11.   ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  12. #ifndef ONLINE_JUDGE
  13.   freopen("inp.txt", "r", stdin);
  14.   freopen("out.txt", "w", stdout);
  15. #endif
  16. }
  17.  
  18. int main()
  19. {
  20.   Aror();
  21.   double x, y;
  22.   cin >> x >> y;
  23.   if (x == 0 && y == 0)
  24.   {
  25.     cout << "Origem"
  26.          << "\n";
  27.   }
  28.   if (y == 0)
  29.   {
  30.     cout << "Eixo X"
  31.          << "\n";
  32.   }
  33.   if (x == 0)
  34.   {
  35.     cout << "Eixo y"
  36.          << "\n";
  37.   }
  38.   if (x > 0 && y > 0)
  39.   {
  40.     cout << "Q1"
  41.          << "\n";
  42.   }
  43.   if (x > 0 && y < 0)
  44.   {
  45.     cout << "Q4"
  46.          << "\n";
  47.   }
  48.   if (x < 0 && y < 0)
  49.   {
  50.     cout << "Q3"
  51.          << "\n";
  52.   }
  53.   if (x < 0 && y > 0)
  54.   {
  55.     cout << "Q2"
  56.          << "\n";
  57.   }
  58.   return 0;
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement