fork download
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5. int a,b,c,t,i;
  6. int one,two,three;
  7. scanf("%d",&t);
  8.  
  9. for(i=1; i<=t; i++)
  10. {
  11. scanf("%d %d %d",&a,&b,&c);
  12. printf("Case %d:",i);
  13. if(a>b&&a>c)
  14. {
  15. one = a;
  16. if(b>c)
  17. {
  18. two = b;
  19. three = c;
  20. }
  21. else
  22. {
  23. two = c;
  24. three = b;
  25. }
  26. }
  27.  
  28. if(b>a&&b>c)
  29. {
  30. one = b;
  31. if(a>c)
  32. {
  33. two = a;
  34. three = c;
  35. }
  36. else
  37. {
  38. two = c;
  39. three = a;
  40. }
  41. }
  42.  
  43. if(c>a&&c>b)
  44. {
  45. one = c;
  46. if(a>b)
  47. {
  48. two = a;
  49. three = b;
  50. }
  51. else
  52. {
  53. two = b;
  54. three = a;
  55. }
  56. }
  57. printf(" %d %d %d",three,two,one);
  58. if(i<t){
  59. printf("\n");
  60. }
  61. }
  62.  
  63. return 0;
  64. }
  65.  
Success #stdin #stdout 0s 4340KB
stdin
Standard input is empty
stdout
Standard output is empty