In a match, there are 6 referees giving their scores. In computing the final score, the 1 highest score and the 1 lowest score must be removed before averaging the remaining 4 scores. The average score is just the final score. Please compute the final score for a player based on these refereesĄŻ scores.
|5||if B4!=6||return 0||
In A2, the resulting player score is as follows:
Using subprogram to compute is similar to the model of direct looping and executing. However, the subprogram is easier for code maintenance because the subprogram can be modularized to implement the computation function.