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