Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main() {
- int a, b, c, a2, b2, c2;
- cin >> a >> b >> c >> a2 >> b2 >> c2;
- if (a<=b){
- swap(a,b);
- }
- if (a<=c){
- swap(a,c);
- }
- if (b<=c){
- swap(b,c);
- }
- if (a2<=b2){
- swap(a2,b2);
- }
- if (a2<=c2){
- swap(a2,c2);
- }
- if (b2<=c2){
- swap(b2,c2);
- }
- if (a-a2==0 and b-b2==0 and c-c2==0){
- cout << "Boxes are equal";
- }
- else if (a-a2>=0 and b-b2>=0 and c-c2>=0){
- cout << "The first box is larger than the second one";
- }
- else if (a-a2<=0 and b-b2<=0 and c-c2<=0){
- cout << "The first box is smaller than the second one";
- }
- else {
- cout << "Boxes are incomparable";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement