http://tpcg.io/peJ1WUji
Here it is printing every time yes when the sum of subset is zero.
How should I ensure that when it print yes the first time… then don’t print again.
Multiple answer
you can use a flag variable for this
initially set flag =true
now write
if(flag){
cout<<"Yes";
flag=flase;
}
now from next time flag is false so it will not print yes
if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like
: and don’t forgot to mark doubt as resolved 
I have used flag …then also it is printing two times… Please see this
Sorry it got solved… i was not passing the address…
okay great 
well done