If i was given a 2D array of {[1,2,3][4,5,6][7,8,9]} I want to be able to return [1,4,7][1,4,8][1,4,9][1,5,7] and so on. The length of the array will be the same as the number of arrays inside of the 2D array. So it will always be a 2X2 or 3X3 etc. I have so far been able to read in a file to create this 2D array but have only been able to figure out how to make a combination from a regular array and can't figure out how to make a loop that will create a combination from a 2D array. Any ideas on how I should structure my code to do this? I'm perfectly happy with psuedocode or just logic, I just can't seem to figure out how to make it so I can get every combination.