Advertisement
Guest User

Untitled

a guest
Nov 19th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6. int a1,b1,c1,a2,b2,c2;
  7. cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2;
  8. if (a1>b1) std::swap(a1,b1);
  9. if (a1>c1) std::swap(a1,c1);
  10. if (b1>c1) std::swap(b1,c1);
  11.  
  12. if (a2>b2) std::swap(a2,b2);
  13. if (a2>c2) std::swap(a2,c2);
  14. if (b2>c2) std::swap(b2,c2);
  15.  
  16. if ((a1 == a2) && (b1 == b2) && (c1 == c2)) cout << "Boxes are equal";
  17. else if ((a1 <= a2) && (b1 <= b2) && (c1 <= c2)) cout <<"The first box is smaller than the second one";
  18. else if ((a1 >= a2) && (b1 >= b2) && (c1 >= c2)) cout <<"The first box is larger than the second one";
  19. else cout <<"Boxes are incomparable";
  20.  
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement