Mathematical solution of finding combination equal to given sum
Answers
Answered by
0
Answer:
Given a positive number, find out all combinations of positive numbers that adds upto that number. The program should print only combinations, not permutations. For example, for input 3, either 1, 2 or 2, 1 should be printed.
Input: N = 3
Output:
1 1 1
1 2
3
Input: N = 5
Output:
1 1 1 1 1
1 1 1 2
1 1 3
1 2 2
1 4
2 3
5
Answered by
0
what type of questions you gives us
Similar questions