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