Hi
I have a every combination program, it's working fine but i've got one problem.
I want to have program which gives me every combination of let's say 10 letters in 7 letters word ( that's 120 combinations)
But my program is giving me combinations of let's say 10 letters = every combination in 10 letter word
So i want this program to do combination of X letters to Y number of letters word. Code of this program is below:
You say that you want combinations (nCr), but your program is producing permutations (nPr). There's a world of a difference. There is only 1 combination of 5 things from 5, but there are 5!=120 permutations of 5 things from 5.
In COMBINATIONS order doesn't matter, just the content of a set. In PERMUTATIONS then the order is crucial.
If you do want combinations then you can create them recursively.