# compute an arithmetic mean(average), median, and mode for up to 50 test scores

C programming: I need to compute an arithmetic mean(average), median, and mode for up to 50 test scores. The data are contained in a text file. The program should start with a function to read the data file and fill the array. There may be fewer than 50 scores. This will require that the read function retrun the index for the last element in the array. To determine the median, I must first sort the array. The mdian is the score in the middle of the range. This can be determined by selecting the score at last/2 if last is odd. The mode is the score that occurs the most often. After building the frequency array, use it to determine which score occurred most often. (Two scores can occur the same number of times) I am working on a Unix operating system. Every time I compile it, it tells me that line number 7 is an illegal variable. What am I doing wrong?

Â© BrainMass Inc. brainmass.com March 6, 2023, 1:08 pm ad1c9bdddfhttps://brainmass.com/computer-science/c/compute-an-arithmetic-mean-average-median-and-mode-for-up-to-50-test-scores-2923

#### Solution Preview

HI,

<br>

<br>I read your program and find the following problems:

<br>1.void ...

#### Solution Summary

Help to compute an arithmetic mean(average), median, and mode for up to 50 test scores is provided.