fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main() {
  5. float x,y;
  6. cin >> x >> y;
  7. if (x > 0 && y > 0 )
  8. {
  9. cout << "1" << endl;
  10. }
  11. else if (x < 0 && y > 0 )
  12. {
  13. cout << "2" << endl;
  14. }
  15. else if (x < 0 && y < 0 )
  16. {
  17. cout << "3" << endl;
  18. }
  19. else if (x > 0 && y < 0 )
  20. {
  21. cout << "4" << endl;
  22. }
  23. else
  24. cout << "0" << endl;
  25. return 0;
  26. }
Success #stdin #stdout 0s 4376KB
stdin
0 1
stdout
0