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