i have let's say the following arrays..
int[] array_1 = new int[1] { 2 };
int[] array_2 = new int[2] { 3, 4 };
int[] array_3 = new int[3] { 7,5, 6 };
int combinations;
combinations = array_1.Length * array_2.Length * array_3.Length;
what i want to do is to create a new array where each column will contain elements from each of the above arrays and the number of rows will be the combination of all elements of the above array. in this case the number of columns is 3 (because i have 3 arrays) and the number of columns is 6, as combinations of all elements are 1*2*3=6.So, my new array is going to be:
int array_num = 3;
int[,] comb = new int[combinations, array_num];
I want to fill each column in the following way: The first column will contain elements from the array_1 array which will change every
int c0 = (combinations / array_1.Length);
elements. the second column will contain elements from the array_2 which will change every
int c1=(c0/array_2.Length);
elements. And the third column will contain elements from thw array_3 which will change every
int c2=(c1/array_3.Length);
elements. For this particular example the result comb array will be this:
2 3 7
2 3 5
2 3 6
2 4 7
2 4 5
2 4 6
I hope i made my problem clear and I'm looking forward to any suggestions about how should i start, since I'm new in programming.