You are viewing a single comment's thread. Return to all comments →
int max_of_four(int a, int b, int c, int d){ int max=0; if(a-b>0 && a-c>0 && a-d>0){ max=a; } else if(b-a>0 && b-c>0 && b-d>0){ max=b; } else if(c-a>0 && c-b>0 && c-d>0){ max=c; } else{ max=d; } return max; }
return 0;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Functions in C
You are viewing a single comment's thread. Return to all comments →
int max_of_four(int a, int b, int c, int d){ int max=0; if(a-b>0 && a-c>0 && a-d>0){ max=a; } else if(b-a>0 && b-c>0 && b-d>0){ max=b; } else if(c-a>0 && c-b>0 && c-d>0){ max=c; } else{ max=d; } return max; }
}