// suma PRYTUNOW.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include using namespace std; int *w,*x; void SumOfSubsets(int,int,int,int); int main() { int i,j,temp,ord,max,sum=0; cout<<"\t\t\t\tSUMA PODZBIOROW\n"; cout<<"\n\nPodaj ilosc elementow: "; cin>>ord; cout<<"\n"; w = new int[ord+1]; x = new int[ord+1]; cout<<("\n\nPodaj elementy listy: \n"); for(i=1;i<=ord;i++) { cout<<"Element #"<>w[i]; sum+=w[i]; } cout<<("\nEnter the sum to be made: "); cin>>max; sort(w, w+ord+1); if((max=m)&&((s+w[k+1])<=m)) { x[k]=0; SumOfSubsets(s,k+1,r-w[k],m); } } ///////////////////////////////////////////////