After learning a little about recursion, I've got an assignment to write a recursive procedure that will accept a phone number and return all the possible letter combinations (x^3). So if ListMnemonics("23") is called, it will give AD, AE, AF, BD, BE, BF, etc.
I've got a char array:
I have a function that will get a phone number (i.e. 1234567) and put it into an integer array (i.e {1,2,3,4,5,6,7} ) using malloc to determine the size of the array.
However, I have no idea where to begin using recursion to solve this problem or how it is involved when displaying the solution!
Thanks for any help!!
I've got a char array:
In which the array can be accessed as (x,y). Therefore keypad 3, first letter, is (2,0) "D". (Yes, if the user gives "3" the code subtracts 1 to get to the proper element in the array).code:<HR>Code:char mnArr[9][3] = {" ","ABC","DEF","GHI","JKL","MNO","PRS","TUV","WXY"};
I have a function that will get a phone number (i.e. 1234567) and put it into an integer array (i.e {1,2,3,4,5,6,7} ) using malloc to determine the size of the array.
However, I have no idea where to begin using recursion to solve this problem or how it is involved when displaying the solution!
Thanks for any help!!