Knapsack problem/Continuous: Difference between revisions
m
→{{header|Sidef}}: minor output improvement
m (→version 1: added/changed whitespace and comments, shorted the SORTD subroutine.) |
m (→{{header|Sidef}}: minor output improvement) |
||
Line 2,547:
limit -= item[1];
if (ratio == 1) {
printf("%-8s %
}
else {
Line 2,559:
<pre>
Item Fraction Weight Value
salami all
ham all
brawn all
greaves all
welt
----------------------------
total value: 349.37837837838
|