Last list item: Difference between revisions
Content added Content deleted
m (→{{header|Julia}}: show interim values) |
Thundergnat (talk | contribs) m (→{{header|ALGOL 68}}: Not quite following task requirements) |
||
Line 10: | Line 10: | ||
=={{header|ALGOL 68}}== |
=={{header|ALGOL 68}}== |
||
{{improve|Algol 68|Task specifically requires that the interim sum be appended to the '''end''' of the list.}} |
|||
Was a translation of the sorted Wren version but the sorting has been removed as per the revised task requirements. |
Was a translation of the sorted Wren version but the sorting has been removed as per the revised task requirements. |
||
<lang algol68>BEGIN # find the last element after |
<lang algol68>BEGIN # find the last element after repeatedly adding the sum # |
||
# of the two smallest elements and removing them # |
# of the two smallest elements and removing them # |
||
[ 1 : 9 ]INT a := ( 6, 81, 243, 14, 25, 49, 123, 69, 11 ); |
[ 1 : 9 ]INT a := ( 6, 81, 243, 14, 25, 49, 123, 69, 11 ); |