Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- cout << ("Input x and y \n");
- float x, y;
- cin >> x >> y;
- if ((y >= 0 && y <= 1 - abs(x)) || (y >= -1 && y < 0 && x >= -1 && x <= 1)) {
- cout << ("Point belongs to this set");
- }
- else {
- cout << ("The point does not belong to this set");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement