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