Driver code
public static void Main ( ) { float [ ] val = { 14 , 27 , 44 , 19 } ; float [ ] wt = { 6 , 7 , 9 , 8 } ; int n = val . Length ; int W = 50 ; Console . WriteLine ( knapSack ( W , wt , val , n ) ) ; } }