How to make all possible sum combinations from array elements in VB
- by Elma
If there is an array with elements: 1,2,3,4, the program should return another array with sum of all combinations:
1
2
3
4
3 (1+2)
4 (1+3)
5 (1+4)
5 (2+3)
6 (2+4)
7 (3+4)
6 (1+2+3)
7 (1+2+4)
8 (1+3+4)
9 (2+3+4)
10 (1+2+3+4)