Pabon_SEC

Cabin baggage

Sep 3rd, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. main()
  4. {
  5.     int t,sum,b,c=0,count;
  6.  
  7.     double a,l,w,d,wgt;
  8.  
  9.     scanf("%d",&t);
  10.  
  11.     count=0;
  12.  
  13.     while(t--)
  14.     {
  15.         b=1;
  16.  
  17.         scanf("%lf%lf%lf%lf",&l,&w,&d,&wgt);
  18.  
  19.         a=l+w+d;
  20.  
  21.         if(((l<=56 && w<=45 && d<=25)||(a<=125)) && wgt<=7.0)
  22.         {
  23.             printf("%d\n",b);
  24.  
  25.             count++;
  26.         }
  27.         else
  28.             printf("%d\n",c);
  29.  
  30.     }
  31.  
  32.     printf("%d\n",count);
  33.  
  34.     return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment