Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int x1, y1, x2, y2;
- cin >> x1 >> y1 >> x2 >> y2;
- if ((x1 >= 0 && x1 <= 7) && (x2 >= 0 && x2 <= 7) && (y1 >= 0 && y1 <= 7) && (y2 >= 0 && y2 <= 7)) {
- if (x1 == x2 || y1 == y2 || (x1 + y1 == x2 + y2) || (abs(x1 - y1) == abs(x2 - y2))) {
- cout << "da";
- }
- else {
- cout << "ne";
- }
- }
- else {
- cout << "ne";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement