We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
to return max=d with this code
return (a>b && a>c && a>d) ? a
: (b>c && b>d) ? b
: (c>d) ? c
: d; the computer need to compare a with all other variables; then b with c,d; then c with d. So that need 6 operators
Functions
You are viewing a single comment's thread. Return to all comments →
to return max=d with this code
return (a>b && a>c && a>d) ? a : (b>c && b>d) ? b : (c>d) ? c : d; the computer need to compare a with all other variables; then b with c,d; then c with d. So that need 6 operators