$ g++ 0-1Knapsack.cpp $ a.out Enter the number of items in a Knapsack:5 Enter value and weight for item 0:11 111 Enter value and weight for item 1:22 121 Enter value and weight for item 2:33 131 Enter value and weight for item 3:44 141 Enter value and weight for item 4:55 151 Enter the capacity of knapsack 300 99