Name
❔ How to generate all possible multiplications of a given number?
I have this code:
And what it does is it generates all the sums of a given number. Here's how it works:
Input: 3
Output: 1 1 1
2 1
So I enter any number I want and it generates all possible sums of that number.
I want to do the same but with multiplications. Anyone know how?
41 replies