simulation of fractional knapsack problem using C