pl help not showing anything…
#include
#include
using namespace std;
int sumup(int in[],int out[],int i,int j,int n,int remaining)
{
//base case
if(remaining==0)
{
out[j]=’\0’;
cout<<out<<endl;
return true;
}
if(in[i]==’\0’)
return false;
if(in[i]>remaining)
return sumup(in,out,i+1,j,n,remaining);
if(in[i]<=remaining)
{
out[j]=in[i];
sumup(in,out,i+1,j+1,n,remaining-in[i]);
}
out[j]=0;
return false;
}
int main() {
int a[1001],out[1001];
int n,m;
cin>>n;
for(int i=0;i<n;i++)
cin>>a[i];
cin>>m;
sort(a,a+n);
sumup(a,out,0,0,n,m);
return 0;
}`