Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int A1, B1, C1, A2, B2, C2, tmp;
- cin >> A1 >> B1 >> C1 >> A2 >> B2 >> C2;
- if (A1 > B1) {tmp = A1; A1 = B1; B1 = tmp;}
- if (A1 > C1) {tmp = A1; A1 = C1; C1 = tmp;}
- if (B1 > C1) {tmp = B1; B1 = C1; C1 = tmp;}
- if (A2 > B2) {tmp = A2; A2 = B2; B2 = tmp;}
- if (A2 > C2) {tmp = A2; A2 = C2; C2 = tmp;}
- if (B2 > C2) {tmp = B2; B2 = C2; C2 = tmp;}
- if (A1 == A2 && B1 == B2 && C1 == C2)
- {
- cout << "Boxes are equal";
- }
- else if (A1 <= A2 && B1 <= B2 && C1 <= C2)
- {
- cout << "The first box is smaller than the second one";
- }
- else if (A1 >= A2 && B1 >= B2 && C1 >= C2)
- {
- cout << "The first box is larger than the second one";
- }
- else
- {
- cout << "Boxes are incomparable";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement