# mean and median using arrays, help!!

• 10-15-2001
brandondere
mean and median using arrays, help!!
Can someone send me code on how to use a user input of ten numbers into and array, and then how to find the mean (average) and the median (middle number when numberss are sorted) of the ten numbers the user inputs? Before the median is printed it need to print the numbers sorted first. Help me out, Im lost!
• 10-15-2001
Troll_King
Code:

```int main() {   //code goes here   return 0; }```
• 10-15-2001
brandondere
...........
we have a comedian...
• 10-15-2001
Troll_King
Why should I do your homework?
• 10-15-2001
The Unregistered One
Mean should be pure simplicity. Just run the array through a loop, adding each element to a sum variable. Then divide the sum by the total numbers of the array(10 in your case).
The Median is a little more difficult, but still no big deal. After sorting the elements of the array you have to take the 5th and 6th element, add them up, and divide by 2 to give you your median since your dealing with an even number of elements.That should be plenty of help.