June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -22,11 +22,6 @@ gear = [KPDSupply("map", 9, 150, 1),
KPDSupply("book", 30, 10, 2)]
pack = solve(gear, 400)
println("The hiker should pack:")
for s in pack
println(" ", s.quant, " ", s.item)
end
println()
println("Packed Weight: ", mapreduce(x->x.weight*x.quant, +, pack))
println("Packed Value: ", mapreduce(x->x.value*x.quant, +, pack))
println("The hiker should pack: \n - ", join(pack, "\n - "))
println("\nPacked weight: ", sum(getfield.(pack, :weight)), " kg")
println("Packed value: ", sum(getfield.(pack, :value)), " €")