(Telephone-Number Word Generator) Standard telephone keypads contain the
digits zero through nine. The numbers two through nine each have three letters
associated with them (Fig. 14.27 ). Many people find it difficult to memorize
phone numbers, so they use the correspondence between digits and letters to
develop seven-letter words that correspond to their phone numbers. For
example, a person whose telephone number is \(686-2377\) might use the
correspondence indicated in Fig. 14.27 to develop the seven-letter word
"NUMBERS." Every seven-letter word corresponds to exactly one seven-digit
telephone number. A restaurant wishing to increase its takeout business could
surely do so with the number \(825-3688\) (i.e., "TAKEOUT").
Every seven-letter phone number corresponds to many different seven-letter
words. Unfortunately, most of these words represent unrecognizable
juxtapositions of letters. It is possible, however, that the owner of a
barbershop would be pleased to know that the shop's telephone number,
\(424-7288,\) corresponds to "HAIRCUT." The owner of a liquor store would, no
doubt, be delighted to find that the store's number, \(233-7226,\) corresponds
to "BEERCAN." A veterinarian with the phone number \(738-2273\) would be pleased
to know that the number corresponds to the letters "PETCARE." An automotive
dealership would be pleased to know that the dealership number, \(639-2277,\)
corresponds to "NEWCARS."
Write a program that, given a seven-digit number, uses a Printstream object to
write to a file every possible seven-letter word combination corresponding to
that number. There are \(2,187\left(3^{7}\right)\) such combinations. Avoid
phone numbers with the digits 0 and 1