Advertisement
daniv1

Untitled

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