Advertisement
Guest User

Untitled

a guest
Nov 16th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <math.h>
  4. #include <stdlib.h>
  5.  
  6. int main() {
  7. int x, y, z;
  8. scanf("%d", &x);
  9. scanf("%d", &y);
  10. scanf("%d", &z);
  11.  
  12. if (x > y && y > z)
  13. {
  14. printf("%d\n", z);
  15. printf("%d\n", y);
  16. printf("%d\n", x);
  17. }
  18. else if (x > z && z > y)
  19. {
  20. printf("%d\n", y);
  21. printf("%d\n", z);
  22. printf("%d\n", x);
  23. }
  24. else if (y > x && x > z)
  25. {
  26. printf("%d\n", z);
  27. printf("%d\n", x);
  28. printf("%d\n", y);
  29. }
  30. else if (y > z && z > x)
  31. {
  32. printf("%d\n", x);
  33. printf("%d\n", z);
  34. printf("%d\n", y);
  35.  
  36. }
  37. else if (z > x && x > y)
  38. {
  39. printf("%d\n", y);
  40. printf("%d\n", x);
  41. printf("%d\n", z);
  42. }
  43. else if (z > y && y > x)
  44. {
  45. printf("%d\n", x);
  46. printf("%d\n", y);
  47. printf("%d\n", z);
  48. }
  49. else
  50. {
  51.  
  52. }
  53.  
  54. return 0;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement