Input:
- Number of digits in the number
- Sum of digits
- Range of digits that can be used
Output:
- All possible numbers where the sum of digits equals the one defined as an input.
Examples:
(num_digits = 4, sum = 12, range = 0-4)
- 3 4 4 1
- 4 4 4 0
- 4 0 4 4
- 1 4 4 3
(num_digits = 5, sum = 18, range = 0-7)
- 5 5 5 2 1
- 1 2 5 5 5
- 5 5 2 1 5
- 0 2 2 7 7
- 7 7 0 2 2
- 2 2 7 7 0
(num_digits = 3, sum = 20, range = 0-8)
- 8 8 4
- 4 8 8
- 8 4 8
- 7 7 6
- 7 8 5
general method (algorithm) is preferred, however, C# can be a language to chose to resolve
regards