Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # include <iostream>
- using namespace std;
- #include <iomanip>
- #include <math.h>
- #include <cmath>
- int main()
- {
- double x1, y1, x2, y2, x, y;
- cin >> x1;
- cin >> y1;
- cin >> x2;
- cin >> y2;
- cin >> x;
- cin >> y;
- bool vertical = (x == x1 || x == x2) && (y >= y1 && y <= y2);
- bool horizontal = (x >= x1 && x <= x2) && (y == y1 || y == y2);
- if (horizontal == 1 || vertical == 1)
- {
- cout << "Border" << endl;
- }
- else
- {
- cout << "Inside / Outside" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement