Question: C PROGRAMING ! Given an array of scores, compute the int average of the first half and the second half, and point whichever is larger.

C PROGRAMING ! Given an array of scores, compute the int average of the first half and the second half, and point whichever is larger. We'll say that the second half begins at index length/2. The array length will be at least 2. To practice decomposition, write a separate helper method double average (int scores[], int start, int end) which computes the average of the elements between indexes start.. end. Call your helper method twice to implement the code: the first number n input is the size of an array (<=20), then all the numbers in this array, output the larger average.

[input]

4

1234

[ouput]

3.50000

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!