Recursive Programming Brainteaser
Substitue a number for each character so that when you add the first *word* to the second *word* you get the third *word* as the result.
...DONALD
.+GERALD
..-------
...ROBERT
there is only one answer (that I know of) out of a million possibilities. I solved it by brute force on the same day that my mathematician friend did, but forget the answer.
I have a few hints in case anyone wants them.
T = an even number
You can carry the one to the left
Each character is a different digit
Digits used are 0-9
(can't left justify leading spaces.)
answer is in format
111111+222222=333333
dddddd+ccccccc=ffffff
Have fun :D
Re: Recursive Programming
Quote:
Originally posted by dglienna
T = an even number
That's quite obvious, since D + D = T (or D + D = 10 + T)
BTW, what's recursive about this? Are we supposed to find a recursive solution?