Advertisement
myloyo

3.1.8

Oct 31st, 2022 (edited)
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <iomanip>
  4.  
  5. using namespace std;
  6. int main()
  7. {
  8.     double x, y;
  9.     cin >> x >> y;
  10.     if (((x * x + y * y) < 25 * 25) && (y <= abs(x)) && (y <= 0)) {
  11.         cout << "in space" << endl;
  12.     }
  13.     else if (((x * x + y * y) > 25 * 25) || (y > abs(x) || (y > 0))) {
  14.         cout << "out of space" << endl;
  15.     }
  16.     else {
  17.         cout << "on the border" << endl;
  18.     }
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement