Knapsack problem/Continuous: Difference between revisions
Content added Content deleted
(→{{header|GNU APL}}: adding output display section) |
(→{{header|GNU APL}}: minor edit to output printing) |
||
Line 183: | Line 183: | ||
⍝ Output |
⍝ Output |
||
⎕←'ITEM' 'WEIGHT AVAILABLE' 'WEIGHT SELECTED' ⍪ Take |
|||
⎕←'' |
|||
⎕←'total cost:' TotalCost |
|||
</lang> |
</lang> |
||
{{out}} |
{{out}} |
||
<pre> |
<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> |
</pre> |
||