Share your repls and programming experiences

← Back to all posts
Combinations with Repetitions
Ohcsnad (0)

User inputs:
n = number of variables
q = sum of variables

The code returns the number of solutions and all possible combinations with repetitions for the equation x1+x2+x3...xn=q.