For instance, translate FOO-BARR into words, and 908-5656 into all the
possible letter combinations.
If not, how would I go about programming a program like this?
aTdHvAaNnKcSe (Thanks in advance)
Ken..
I'm not sure I understand what you mean by "translate FOO-BARR into
words". If you mean "translate into numbers", the problem is fairly
simple, as one can easily write a function that maps letters into digits
(though one has to be careful to handle the "illegal" values, such as "Q",
correctly).
As for writing out all the word possibilities for 7-digit phone
numbers, this is equivalent to counting in ternary up to 7 digits, or 3**7
possible numbers (that's 2187 "words", if the non-Intel processor in my
head is doing its arithmetic correctly ...). [Oops -- forgot myself about
the possible "illegal" numbers, like 1 and 0 ...].
Bob Schor
Pascal Enthusiast