A quiz: the scores of n people are in the array scores (at least 1). Write top_score(scores, n) to return the highest.
top_score({72, 95, 88}, 3)→95top_score({60}, 1)→60int top_score(int scores[], int n)int top_score(int scores[], int n) {
int best = scores[0];
for (int i = 1; i < n; i++) {
// your code here: if it is bigger than best, keep it instead
}
return best;
}
Run tries the examples. When they look right, Submit.