fork download
  1. #include <stdio.h>
  2. //関数のプロトタイプ宣言
  3. //ここ↓を埋めてね1
  4. int max(int x, int y);
  5.  
  6. int main(void) {
  7. int a,b,c,d,x;
  8. a = 1;
  9. b = 5;
  10. c = 3;
  11. d = 4;
  12. x =max(max(a,b), max(c,d));
  13. printf("%d,%d,%d,%d = %d\n",a,b,c,d,x);
  14. return 0;
  15. }
  16. //main関数
  17.  
  18.  
  19. //ここ↓を埋めてね2
  20.  
  21. //max関数の定義
  22. int max(int x, int y){
  23. //ここ↓を埋めてね3
  24. return(x > y)? x:y;
  25.  
  26.  
  27. }
  28.  
  29.  
  30.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
1,5,3,4 = 5