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.
Sorry,my english is bad. But I just want to say that this code: return((a>b?a:b)>(c>d?c:d)?(a>b?a:b):(c>d?c:d)); need more operators (4) to calculate than this code: a>b?(c>d?(c>a?c:a):(d>a?d:a)):(c>d?(c>b?c:b):(d>b?d:b)) need 3. And this code printf("%d\n", ((a>= b && a >= c && a >= d)?a:(b > a && b > c && b > d)?b:(c > a && c > b && c > d)?c:d)); need a lot more operators to calculate
Cookie support is required to access HackerRank
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 →
Sorry,my english is bad. But I just want to say that this code: return((a>b?a:b)>(c>d?c:d)?(a>b?a:b):(c>d?c:d)); need more operators (4) to calculate than this code: a>b?(c>d?(c>a?c:a):(d>a?d:a)):(c>d?(c>b?c:b):(d>b?d:b)) need 3. And this code printf("%d\n", ((a>= b && a >= c && a >= d)?a:(b > a && b > c && b > d)?b:(c > a && c > b && c > d)?c:d)); need a lot more operators to calculate