You see, I\'ve self-taught myself C++ (not completely, I\'m still procrastinating -_-). So, now I started university and they\'re teaching C and they made us do a program of
Try this
int max_of_four(int a,int b,int c,int d){ int max=a; if(b>max) max=b; if(c>max) max=c; if(d>max) max=d; return max; }
without if would be like this
int max_of_four(int a, int b, int c, int d) { return ((a > b && a > c && a > d) ? a: ((b > c && b > d) ? b : (c > d ? c : d))); }