fork download
  1. #include <stdio.h>
  2.  
  3. int max(int x, int y);
  4.  
  5. int main(void) {
  6. int a = 1;
  7. int b = 5;
  8. int c = 3;
  9. int d = 4;
  10.  
  11. int maximum = max(max(a, b), max(c, d));
  12.  
  13. printf("最大値は: %d\n", maximum);
  14.  
  15. return 0;
  16. }
  17.  
  18.  
  19. int max(int x, int y) {
  20. return (x > y) ? x : y;
  21. }
  22.  
  23.  
Success #stdin #stdout 0s 5260KB
stdin
Standard input is empty
stdout
最大値は: 5