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