Averages/Arithmetic mean: Difference between revisions

m
Added works with template, removed whitespace
(Javascript)
m (Added works with template, removed whitespace)
Line 1:
{{task}}Write a program to find the mean (arithmetic average) of a numeric vector. The program should work on a zero-length vector (with an answer of 0).
{{task}}
 
Write a program to find the mean (arithmetic average) of a numeric vector. The program should work on a zero-length vector (with an answer of 0).
 
=={{header|Ada}}==
Line 35 ⟶ 33:
 
=={{header|BASIC}}==
{{works with|QuickBasic|4.5}}
Assume the numbers are in a DIM named nums.
mean = 0
Line 118 ⟶ 117:
 
There are no zero-length vectors in IDL. Every variable has at least one value or otherwise it is <tt><Undefined></tt>.
 
 
=={{header|J}}==
Anonymous user