Sum and product of an array: Difference between revisions
→{{header|langur}}
Langurmonkey (talk | contribs) |
Langurmonkey (talk | contribs) |
||
(One intermediate revision by one other user not shown) | |||
Line 934:
{{Out}}
<pre>77.9699690</pre>
=={{header|Bruijn}}==
<syntaxhighlight lang="bruijn">
:import std/List .
:import std/Math .
arr (+1) : ((+2) : ((+3) : {}(+4)))
main [∑arr : ∏arr]
</syntaxhighlight>
=={{header|C}}==
Line 2,075 ⟶ 2,085:
<syntaxhighlight lang="langur">val .list = series 19
writeln " list: ", .list
writeln " sum: ", fold
writeln "product: ", fold
</syntaxhighlight>
{{out}}
|