Anonymous user
Knapsack problem/Continuous: Difference between revisions
→{{header|GNU APL}}: adding output display section
(→{{header|GNU APL}}: removing warning about output format) |
(→{{header|GNU APL}}: adding output display section) |
||
Line 185:
⍞←2 1 ⍴ (⊂'ITEM' 'WEIGHT AVAILABLE' 'WEIGHT SELECTED' ⍪ Take ) , (⊂'total cost' TotalCost)
</lang>
{{out}}
<pre>
ITEM WEIGHT AVAILABLE WEIGHT SELECTED
ham 3.6 3.6
greaves 2.4 2.4
brawn 2.5 2.5
welt 3.7 3.5
salami 3 3
total cost 349.3783784
</pre>
=={{header|AWK}}==
|