Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- int main()
- {
- using namespace std;
- vector<pair<int, int>> rect;
- int x, y;
- for (int i = 0; i < 2; i++)
- {
- cin >> x >> y;
- rect.push_back(make_pair(x, y));
- }
- cin >> x >> y;
- if (rect[0].first <= x && x <= rect[1].first &&
- rect[0].second <= y && y <= rect[1].second)
- cout << "Check point is inside\n";
- else
- cout << "Check point is outside\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement