Averages/Root mean square: Difference between revisions

m (→‎{{header|PureBasic}}: removed comment about executable size as it served no actual purpose)
Line 482:
Output:
<lang>6.20483682299543</lang>
 
=={{header|SNOBOL4}}==
 
{{works with|Macro Spitbol}}
{{works with|CSnobol}}
 
There is no built-in sqrt( ) function in Snobol4+.
 
<lang SNOBOL4> define('rms(a)i,ssq') :(rms_end)
rms i = i + 1; ssq = ssq + (a<i> * a<i>) :s(rms)
rms = sqrt(ssq / prototype(a)) :(return)
rms_end
 
* # Fill array, test and display
str = '1 2 3 5 7 11 13 17 19 23'; a = array(10)
loop i = i + 1; str len(p) span('0123456789') . a<i> @p :s(loop)
output = str ' -> ' rms(a)
end</lang>
 
Output:
<pre>1 2 3 5 7 11 13 17 19 23 -> 12.4498996</pre>
 
=={{header|Tcl}}==
Anonymous user