0 1 knapsack problem

What is the error with this code this question.
Question link : https://practice.geeksforgeeks.org/problems/0-1-knapsack-problem/0
Code link :: https://ide.codingblocks.com/s/102903

hi sunny there was small error in your code
you didn’t consider the input format correctly.(instead of weight array you made price input and vice versa)
int the knapsack function there was error in your if-else statements
https://ide.codingblocks.com/s/102907 i have corrected your code