fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. double IsPointInSquare(double x1,double x2)
  5. {
  6. double X, Y;
  7. X = abs(X);
  8. Y = abs(Y);
  9. if ( X >= 0 && X <= 1 && Y >= 0 && Y <= 1)
  10. cout << "Yes" <<endl;
  11. else
  12. cout << "No" <<endl;
  13. return 0;
  14. }
  15. int main()
  16. {
  17. double X, Y;
  18. cin >> X >> Y;
  19. IsPointInSquare( X , Y);
  20. return 0;
  21. }
Success #stdin #stdout 0s 15240KB
stdin
3 -7
stdout
Yes