Task

Compute the sum and product of an array of integers.




//sum
put "1,2,3,4" into nums
split nums using comma
answer sum(nums)
 
// product
local prodNums
repeat for each element n in nums
    if prodNums is empty then 
        put n into prodNums
    else
        multiply prodnums by n
    end if
end repeat 
answer prodnums