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