calculating mean, median and mode
807569May 30 2006 — edited May 31 2006If anyone could write this program and give me tips, I would greatly appreciate it and would compensate however:
The basic function of this program is to accept data from the user to represent examination scores and to process statistics about those scores. As long as the user inputs scores, the program will continue to accept more scores. There should be NO PROMPT for a score. Any score over 100 or less than 0 will be ignored by the program. The user can put in as many as 1,000,000 pieces of valid data. To do this, you will need an array of size 1,000,000 and you will need to use a while or a do-while loop to read in the data in to this array. As soon as the user puts in ctrl-Z (end-of-file), or 1,000,000 pieces of data, the program stops accepting input and processes the data. The program will then compute the mean, median, mode, and standard deviation of the valid data entered, and print these statistical values.
For this program, you are required to create and use three meaningful static functions. These functions are of your own design, but there are some very natural tasks in this project that are suitable for functions. These tasks are: accepting input, computing the mean, computing the median, computing the mode, and printing the output. Each of these is best done with a function. Although you are not required to have these specific functions, use of functions is required. You are welcome to use the �sort� function presented in class as one of these functions.