Task

Compute the sum and product of an array of integers.




 
aList = 1:10   nSum=0  nProduct=0
for x in aList nSum += x nProduct *= x next
See "Sum = " + nSum + nl
See "Product = " + nProduct + nl
 