Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     cout << ("Input x and y \n");
  7.     float x, y;
  8.     cin >> x >> y;
  9.     if ((y >= 0 && y <= 1 - abs(x)) || (y >= -1 && y < 0 && x >= -1 && x <= 1)) {
  10.         cout << ("Point belongs to this set");
  11.     }
  12.     else {
  13.         cout << ("The point does not belong to this set");
  14.     }
  15.     return 0;
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement