I do not uderstand what should I change in this code to complete my goal.
I will try to explain better what i would like to do. I will explain problem with smaller number of elements because 16 is too large to write all combinations.
Let say I have array with 6 elements {A,B,C,D,E,F}. Now i need to find combinations 4 of 6.
There are 15 combinations of 4 letters from this set ( n!/(r!(n-r)!)=6!/(2!(6-2)!)=15 ) and they are :
A B C D
A B C E
A B C F
A B D E
A B D F
A B E F
A C D E
A C D F
A C E F
A D E F
B C D E
B C D F
B C E F
B D E F
C D E F
What should I change in you code to have this. Maybe I can not explain good becouse English is not my mother language.