fork download
  1. #include <stdio.h>
  2. int main(void) {
  3. int a , b , c;
  4. scanf("%d %d %d",&a,&b,&c);
  5. if (a > b) { int t = a; a = b; b = t; }
  6. if (b > c) { int t = b; b = c; c = t; }
  7. if (a > b) { int t = a; a = b; b = t; }
  8. printf("%d %d %d", a, b, c);
  9. return 0;
  10. }
  11.  
Success #stdin #stdout 0s 5276KB
stdin
3 5 1
stdout
1 3 5