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