Anonymous user
Sum and product of an array: Difference between revisions
→{{header|Ring}}
No edit summary |
|||
Line 1,915:
<lang ring>
aList = 1:10 nSum=0 nProduct=0
for x in aList nSum += x nProduct *= x next
See "Sum = " + nSum + nl
See "Product = " + nProduct + nl
|