I need to find the Mean, median, mode, and make a histogram of a 99 value array. How ever my sorting function is not sorting the array at all how can I fix this.
First analyze it.
Lines 3--6 are inside the loop, so they would be executed at every iteration. That means that `count' couldn't be greater than 1.
Then in line 13 you say if (count > countMode), however nowhere in your code you touch `count' (except for line 18, that resets it)
By the way, ¿what would be the mode if several numbers have the maximum repetition?
The histogram would be the count of the repetition of each number (perhaps grouped somehow)
You'll need another array which size is the number of ranges you are interested in.