Hellp

please convet Algoritm to C++ code

//---------------------------------------------------------------//
int O(int k,int j)
{
if (j==0)
return 0;
else if (w[j]<=k)
return max(O(k,j-1),v[j]+O(k-w[j],j-1));
else
return O(k,j-1);
//---------------------------------------------------------------//
Topic archived. No new replies allowed.