fork download
  1. #include <stdio.h>
  2. int max(int, int);
  3.  
  4. int main(void) {
  5. int a, b, c, d;
  6. scanf("%d %d %d %d", &a, &b, &c, &d);
  7.  
  8. printf("%d",max(max(a,b),max(c,d)));
  9. return 0;
  10. }
  11.  
  12. int max(int x, int y) {
  13. return (x > y) ? x : y;
  14. }
Success #stdin #stdout 0s 5276KB
stdin
30
42
58
12
stdout
58