fork download
  1. #include <stdio.h>
  2.  
  3. int max(int p, int q){ return p>=q?p:q;}
  4.  
  5. int min(int p, int q){ return p<q?p:q;}
  6.  
  7.  
  8. int main(void) {
  9. int x,y,z;
  10. scanf("%d %d %d", &x, &y,&z);
  11. printf("%d\n", max(max(x,y),z));
  12. printf("%d", min(min(x,y),z));
  13.  
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 4648KB
stdin
5 4 6 
stdout
6
4