Skip to content
Advertisement

Tag: zero

All array combinations with zero in a loop

The following array is given I now want to loop to output all combinations of these numbers with 0. Each number can occur alone or with any other numbers in the array (the rest should be 0). The original position of the numbers should be maintained when they are included in a combination. The numbers of the original array should

Advertisement