Jonathan,
Check out Thread #
780672 Message #
780672 (the entire thread) see a discussion on this type of problem...
>Hello all,
>
>For a bank reconciliation program, I am trying to simulate a situation which mimics lottery possibilities
>
>For example I have a series of numbers 1, 2, 3 and 4.
>I need to find all the possible combinations of those numbers (in any order), which are:
>1+2, 1+3, 1+4, 1+2+3, 1+2+4, 1+3+4,1+2+3+4, 2+3, 2+4, 2+3+4, 3+4.
>
>I need to write code for that and could not find any solution so far.
>Could someone enlighten me with an idea.
>
>Thanks in advance
>
>Jonathan Feldman
Steve Gibson