median mode

This is a discussion on median mode within the C++ Programming forums, part of the General Programming Boards category; I am writing a program for my c++ class and I am have trouble figuring out equations for mode and ...

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    1

    Question median mode

    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

  2. #2
    Registered User
    Join Date
    Nov 2002
    Posts
    1,109
    median - add up arrays elements, divide by number of elements

  3. #3
    Registered User
    Join Date
    Feb 2003
    Posts
    162
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mean, Median, and Mode .....code
    By AdamLAN in forum C++ Programming
    Replies: 2
    Last Post: 10-22-2004, 02:29 PM
  2. Finding Mode Median and Mean
    By Ginny Morgan in forum C Programming
    Replies: 3
    Last Post: 05-08-2003, 03:09 PM
  3. Computing Mean, Median and Mode Using Arrays
    By Rodneo in forum C++ Programming
    Replies: 0
    Last Post: 05-29-2002, 11:40 PM
  4. Implementing "ls -al"
    By pdstatha in forum Linux Programming
    Replies: 11
    Last Post: 03-20-2002, 03:39 AM
  5. Implementing "ls -al"
    By pdstatha in forum C Programming
    Replies: 7
    Last Post: 03-06-2002, 04:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21