Knapsack problem/0-1: Difference between revisions

m
→‎{{header|QB64}}: syntax hi-lighting, formatting
m (→‎{{header|QB64}}: syntax hi-lighting, formatting)
Line 6,034:
 
Program write results to qb64 directory
<lang QB64qbasic>Open "knapsack.txt" For Output As #1
N=7: L=5: a = 2^(N+1): Randomize Timer 'knapsack.bas DANILIN
Dim L(N), C(N), j(N), q(a), q$(a), d(a)
Line 6,059:
Print #1,: Print #1, d(m), q(m), q$(m): End</lang>
 
<lang QB64>Main thing is very brief and clear to even all<br/><br/>
 
Results is reduced manually:
</lang>
 
Results is reduced manually:
{{out}}
<pre> # Mass Cost