Sum and product of an array: Difference between revisions
adding maxima
m (→{{header|REXX}}: indented DO loops, changed '''output''' template, removed superfluous blank lines. -- ~~~~) |
Capra Hircus (talk | contribs) (adding maxima) |
||
Line 787:
120
504</lang>
=={{header|Maxima}}==
lreduce("+", [1, 2, 3, 4, 5, 6, 7, 8]);
36
lreduce("*", [1, 2, 3, 4, 5, 6, 7, 8]);
40320
=={{header|MAXScript}}==
Line 794 ⟶ 802:
product = 1
for i in arr do product *= i</lang>
=={{header|Modula-3}}==
<lang modula3>MODULE Sumprod EXPORTS Main;
|