Hi, I have a problem with writting the knapsack in prolog, I just started prolog, can someone help me please???
The input should be
?-knapsack([a-7-9,b-11-14,c-19-24],100,Amount,Profut)
Amount=[10,1,1]
Profit=128
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.