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