Task

Compute the sum and product of an array of integers.




 
DIM a%(10)
' put some values into the array
FOR i%=1 TO 10
  a%(i%)=i%
NEXT i%
'
sum%=0
product%=1
FOR i%=1 TO 10
  sum%=sum%+a%(i%)
  product%=product%*a%(i%)
NEXT i%
'
PRINT "Sum is ";sum%
PRINT "Product is ";product%
 