Averages/Arithmetic mean: Difference between revisions
Content added Content deleted
(Added K Version) |
(Added Fish) |
||
Line 578: | Line 578: | ||
} |
} |
||
</lang> |
</lang> |
||
=={{header|Fish}}== |
|||
<lang Fish>!vl0=?vl1=?vl&! |
|||
v< +<>0n; >n; |
|||
>l1)?^&,n;</lang> |
|||
Must be called with the values pre-populated on the stack, which can be done in the <tt>fish.py</tt> interpreter with the <tt>-v</tt> switch: |
|||
<pre>fish.py mean.fish -v 10 100 47 207.4</pre> |
|||
which generates: |
|||
<pre>91.1</pre> |
|||
=={{header|Forth}}== |
=={{header|Forth}}== |