Averages/Arithmetic mean: Difference between revisions

m
→‎{{header|REXX}}: change style of "output". -- ~~~~
(→‎BASIC: minor edits to explanatory text; changed "works with" to qbasic)
m (→‎{{header|REXX}}: change style of "output". -- ~~~~)
Line 1,595:
 
=={{header|REXX}}==
<lang rexx>/*REXX*/
test1='10 9 8 7 6 5 4 3 2 1'
say 'numbers='test1
Line 1,622:
 
exit
 
/*---------------------AVG subroutine------------------*/
avg: procedure; arg y
Line 1,631 ⟶ 1,630:
s=s+x
end
return s/max(1,words(y))</lang>
'''output'''
</lang>
<pre style="height:30ex;overflow:scroll">
Output:
<pre style="height:30ex;overflow:scroll">
numbers=10 9 8 7 6 5 4 3 2 1
average=5.5