number of ways to reach a sum...
i hope this is the correct place to post this thread...my problem is to find all possible ways to reach a specific sum S using natural numbers ranging 1,2,3,...n.for example
"how many ways are there to select 10 different numbers from 1-100 so that the sum of the numbers is 804?"
-each natural in the set of 10 numbers should be used only once
-order is not important
any ideas or hints?
ps,there are some answers using programming but i am seeking for an algorithm using pen and paper