Driver program
int main ( ) { int W = 100 ; int val [ ] = { 10 , 30 , 20 } ; int wt [ ] = { 5 , 10 , 15 } ; int n = sizeof ( val ) / sizeof ( val [ 0 ] ) ; cout << unboundedKnapsack ( W , n , val , wt ) ; return 0 ; }