given a list of up to 10 integer numbers and a sum, will display a subset of the numbers whose total
Posted
by Felix
on Stack Overflow
See other posts from Stack Overflow
or by Felix
Published on 2010-04-20T21:22:14Z
Indexed on
2010/04/20
21:43 UTC
Read the original article
Hit count: 245
Write a program which, given a list of up to 10 integer numbers and a sum, will display a subset of the numbers whose total is that sum if one exists or indicate that none exists otherwise. For example, for the list: 5,13,24,9,3,3 and sum = 28, your program should display 13, 9, 3, 3.
How to do this in C++ using a recursive function?
© Stack Overflow or respective owner