You are viewing a single comment's thread. Return to all comments →
Using conditional operator
int max_of_four(int a,int b,int c,int d){ return ((a>b)?a:b)>((c>d)?c:d)?((a>b)?a:b):((c>d)?c:d); }
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 →
Using conditional operator
int max_of_four(int a,int b,int c,int d){ return ((a>b)?a:b)>((c>d)?c:d)?((a>b)?a:b):((c>d)?c:d); }