REM How to calculate the average of many number
REM In this example we generate with the random function a set of numbers and put them in the array number_array.
REM Look at the first for loop

REM With the second for loop we summaries all number together.
REM The summary will be division by the arraysize
REM Then we get the average of the numbers

dim Number_Array(5)
for i =0 to Number_Array_Size
        print Number_Array(i)
next i

for i =0 to Number_Array_Size
next i
print "The average of Number_Array is: "+str$(Number/Number_Array_Size)