Pabon_SEC

Cost cutting

Sep 3rd, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     long long int a,b,c,t,i;
  5.     scanf("%lld",&t);
  6.     for(i=1;i<=t;i++)
  7.     {
  8.         scanf("%lld%lld%lld",&a,&b,&c);
  9.         if((a>b && a<c)||(a>c && a<b))
  10.         {
  11.             printf("Case %lld: %lld\n",i,a);
  12.         }
  13.         else if((b>a && b<c)||(b>c && b<a))
  14.         {
  15.             printf("Case %lld: %lld\n",i,b);
  16.         }
  17.         else if((c>b && c<a)||(c>a && c<b))
  18.         {
  19.             printf("Case %lld: %lld\n",i,c);
  20.         }
  21.     }
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment