>>However, if there is no mode (every number only appears once), it just returns the first number for mode. if there is more then one mode, it just returns the first mode.
What behavior do you want it to do ?
cout << "no mode" or "null" (doesnt really matter)
what I would do is create another list of all the modes. The way you have it programmed it can print only one mode. Create a 2d array, the first dimension will have the actual value and the second dimension the number of times that value occurs in the original array. Something like this (untested)
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.