fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int a, b, c, p;
  5. scanf("%d %d %d", &a, &b, &c);
  6.  
  7. if (a > b) {
  8. p = a;
  9. a = b;
  10. b = p;
  11. } if (a > c ) {
  12. p = a;
  13. a = c;
  14. c = p;
  15. } if (b > c) {
  16. p = b;
  17. b = c;
  18. c = p;
  19. }
  20.  
  21. printf("%d %d %d\n" ,a,b,c);
  22.  
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0s 5300KB
stdin
5 9 1
stdout
1 5 9