fork download
  1. #include <stdio.h>
  2.  
  3. int max(int x, int y);
  4.  
  5. int main(void) {
  6. int a=1, b=5, c=3, d=4;
  7. int ans;
  8.  
  9.  
  10.  
  11. printf("%d,%d,%d,%dの最大値は%d",a,b,c,d,ans);
  12. ans=max(max(a,b), max(c,d));
  13. return 0;
  14. }
  15.  
  16. int max(int x, int y){
  17. return (x>y)?x:y;
  18. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
1,5,3,4の最大値は0