r3da / misc

1 stars 1 forks source link

Giving an integer x, print out all the ways to sum to x #1

Closed axeliux closed 10 years ago

axeliux commented 10 years ago

Example: x = 3

1+1+1 1+2 3

r3da commented 10 years ago

hmm, it's worth mentioning another example : x = 4 1+1+1+1 1+1+2 1+3 2+2 4