RosettaCodeData/Task/Averages-Arithmetic-mean/Run-BASIC/averages-arithmetic-mean.basic

12 lines
264 B
Plaintext

print "Gimme the number in the array:";input numArray
dim value(numArray)
for i = 1 to numArray
value(i) = i * 1.5
next
for i = 1 to total
totValue = totValue +value(numArray)
next
if totValue <> 0 then mean = totValue/numArray
print "The mean is: ";mean