Averages/Pythagorean means: Difference between revisions

→‎{{header|VBA}}: excel has a built-in harmonic mean ...
(→‎{{header|VBA}}: excel has a built-in harmonic mean ...)
Line 3,267:
End Function
Private Function harmonic_mean(s() As Variant) As Double
For iharmonic_mean = 1 To UBoundWorksheetFunction.HarMean(s)
s(i) = 1 / s(i)
Next i
harmonic_mean = UBound(s) / WorksheetFunction.sum(s)
End Function
Public Sub pythagorean_means()
Line 3,282 ⟶ 3,279:
G = 4,52872868811677
H = 3,41417152147406 </pre>
 
=={{header|VBScript}}==
<lang vb>
255

edits