In the long jump everyone gets three tries, a, b and c (in cm); find the longest. max2(a, b) is already written and returns the bigger of two. Write best_jump(a, b, c) to return the biggest of the three using max2.
best_jump(310, 342, 298)→342best_jump(250, 250, 250)→250int best_jump(int a, int b, int c)int max2(int a, int b) {
if (a > b) {
return a;
}
return b;
}
int best_jump(int a, int b, int c) {
// your code here: return the biggest of the three with max2
return 0;
}
Run tries the examples. When they look right, Submit.