Alright, so you have input that looks like this:
1 6
2 3 4
1 8
3 4 7 2
1st # represents the number of dimensions of the array
2nd # = the # of elements in the array.
3rd # = the rows of the array (index)
4th # = columns
Write a segment of code that will print out the indices of the array. For example, the output of the 2nd line should look like:
00
01
02
03
10
11
12
13
20
21
22
23
I hope that makes sense. I understand how to write the code without recursion. It's just a matter of for loops and cout statements but I can't figure out how to use recursion. For the simplest case, which would be a 1-dimensional array, we'd write out the code but for the second simplest case we have to use recursion which will then work for the next 3rd and 4th etc cases.