You are viewing a single comment's thread. Return to all comments →
Here is my code.. hope it helps!! max : max value variable; max_t : temporary max value variable;
int max_of_four(int a, int b, int c, int d) { int num[4] ={a,b,c,d},i,max=0,max_t; for(i=0;i<4;i++){ max_t=max-num[i]; if (max_t<=0){ max=num[i]; } } return max; }
Seems like cookies are disabled on this browser, please enable them to open this website
Functions
You are viewing a single comment's thread. Return to all comments →
Here is my code.. hope it helps!! max : max value variable; max_t : temporary max value variable;