Advertisement
erfanul007

UVa 11727

Nov 27th, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int n,a,b,c,i;
  5. scanf("%d",&n);
  6. for(i=1;i<=n;i++){
  7. scanf("%d %d %d",&a,&b,&c);
  8. if((a>b && a<c)||(a<b&&a>c))
  9. printf("Case %d: %d\n",i,a);
  10. else if((b>a && b<c)||(b<a&&b>c))
  11. printf("Case %d: %d\n",i,b);
  12. else if((c>a && c<b)||(c<a&&c>b))
  13. printf("Case %d: %d\n",i,c);
  14. }
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement