Advertisement
Ahmed_Negm

Untitled

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