Sum and product of an array: Difference between revisions

m
m (→‎{{header|REXX}}: added whitespace, simplified variable name for the number of numbers. -- ~~~~)
Line 642:
29 8 75 97 24 40 21 82 77 9
 
NB. on a table, each row is an item to be summed:
sum a
177 105 173 131 115 118 110 127 178 166
Line 647 ⟶ 648:
151380 18800 174000 14065 36432 58880 39270 16400 194810 55188
 
NB. but we can tell J to sum everything within each row, instead:
sum"1 a
466 472 462
6,962

edits