Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21100

finding all combination of n numbers with different k without repetion

$
0
0
Hi all
I want all combination of n numbers with different k .for example
I have 4 numbers :1,2,3,4. K is 2 so we must have (1,2)(2,3)(3,4)...all combinition with k without repetion.
K is 3 (1,3,4)... k begin from 2 to n.
We can't have repetive combination (1,2)(2,1) for example.
Please help me I code it by for loops but it doesn't work :-(

Viewing all articles
Browse latest Browse all 21100

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>