Advertisement
Guest User

ййй

a guest
Jun 15th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4. int a,b,c,d,e,f,v1,v2;
  5. cin >> a >> b >> c >> d >> e >> f;
  6. v1=a*b*c;
  7. v2=d*e*f;
  8. 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 ){
  9. cout << "The first box is smaller than the second one";}
  10. 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){
  11. cout << "The first box is larger than the second one";}
  12. if( a<=0 || b<=0 || c<=0 || d<=0 || e<=0 || f<=0 || v1<=0 || v2<=0 ){
  13. cout << "Boxes are incomparable";}
  14. if(v1==v2 && a>0 && b>0 && c>0 && d>0 && e>0 && f>0 ){
  15. cout << "Boxes are equal";}
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement