I am writing a program for my c++ class and I am have trouble figuring out equations for mode and median of arrays. Any tips
I am writing a program for my c++ class and I am have trouble figuring out equations for mode and median of arrays. Any tips
median - add up arrays elements, divide by number of elements
sort the numbers, then just array[(numbers/2) + 1] is the median if odd number of numbers, and array[numbers/2] (or however u wanna handle if there is an even amount of numbers