Program question--need help!!!
Hi, I am TRYING to make a program but am having absolutely NO SUCCESS. I have read the sticky about no posting homework up but I have exhausted all my resources and have tried a few things but nothing has worked. If any one could post some help or send me an e-mail with help, I would greatly appreciate it!
The problem states:
Write a program that:
Reads an arbitrary but fixed number n (set value of n to 30) of input records from the text file survey.dat each containing survey results consisting of a unique integer identifier for a customer followed by a single integer rating in the range 1-10 inclusive representing that customer's rating for a newly-marketed product. After all values have been read and stored, sort the table of values by customer ID and print to the text file results.dat the following information:
(a) the table contents sorted by customer ID suitably labeled
(b) the arithmetic mean of the ratings, suitably labeled
(c) the harmonic mean of the ratings, suitably labeled
(d) the median value of the ratings, suitably labeled (the array of survey information will need to be resorted prior to determining the median value, this time using the rating as the sort key)
(e) the mode of the ratings, suitably labeled, followed by a list of customer IDs whose ratings were equal to that mode value
I'm so confused :confused: and sorry if this creates an inconvenience to anyone, but I have tried everything and don't know what to do!!! PLEASE HELP!!!
Thanks and your help is greatly appreciated!!!