Averages/Median: Difference between revisions

Content deleted Content added
add JavaScript
Undo. wp: states "At most half the population have values less than the median and at most half have values greater than the median". Which is OK for Autohotkey
Line 53:
 
=={{header|AutoHotkey}}==
{{incorrect|AutoHotkey|"The lower of the middle two if length is even" is not the median.}}
Takes the lower of the middle two if length is even
<lang AutoHotkey>seq = 4.1, 7.2, 1.7, 9.3, 4.4, 3.2, 5
seq = 4.1, 7.2, 1.7, 9.3, 4.4, 3.2, 5
MsgBox % median(seq, "`,") ; 4.1
 
Line 64:
median := Floor(seq0 / 2)
Return seq%median%
}
}</lang>
 
=={{header|C}}==