I'm wanting to write some code that lists all the combinations of r numbers selected from a total of n numbers and places them into an array.
I am working with the simple example of n = 5, r = 3 (note that there are 10 unique combinations in this case).
int Low = 1;
int High = 5;
int Choose = 3;
int nChooseR = 10;
int [,]CombinationstAray = new int[nChooseR, Choose];
for (int i = 0; i < nChooseR; i++)
for (int j = 0; j < Choose; j++)
// I have been playing with code here, but haven't written
// anything good yet
Is there an easy way to do this, or does it get difficult. I am VERY new to c# (and programming languages in general).
View Complete Post