Moving Average by pooq

dim a(300)
for i=1to 300input""s$,a(i)
t=t+a(i)-a(max(0,i-5))
?s$,a(i)using"%5.1f"," Average: ",t/min(i,5)using"%.1f"next

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page