Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Guys,

I hope you guys help me to find a solution for my problem.

I have numbers like 1,5,9,21,40,12,44,14,46,34 and i want to make a lines that have 6 numbers. Like "1,5,12,21,40,46". There's a lot of combinations with that numbers but i don't know how to do it.

p.s: sorry for my bad english.
Posted
Comments
Dr.Walt Fair, PE 5-Aug-11 19:58pm    
What constraints do you have? Must the numbers not repeat? Do you need all of the combinations or just one at random?
Sosyopat 5-Aug-11 20:14pm    
Numbers could repeat. I need all of combinations.
Thank you for your interest.

Ready to drink from the fire hose? :)

Article on Permutation, Variations, et al.[^]
 
Share this answer
 
Comments
RaisKazi 6-Aug-11 0:39am    
Useful link. 5!
 
Share this answer
 
Comments
RaisKazi 6-Aug-11 0:39am    
useful links. 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900