To make telephone numbers easier to remember, some companies use letters to show their telephone
number. For example, using letters, the telephone number 438-5626 can be shown as GET LOAN. In some cases, to
make a telephone number meaningful, companies might use more than seven letters. For example, 225-5466 can be
displayed as CALL HOME, which uses eight letters. Write a program that prompts the user to enter a telephone number
expressed in letters and outputs the corresponding telephone number in digits. If the user enters more than seven
letters, then process only the first seven letters. Also output the (hyphen) after the third digit. Allow the user to use
both upper case and lowercase letters as well as spaces between words. The special characters - (hyphen) represents
the number 1 and the_ (underscore) represents the number zero. Moreover, your program should process as many
telephone numbers as the user wants.
Enter Y/y to convert a telephone number from letters to digits.
Enter any other letter to terminate the program.
Y
Enter a telephone number using 7 or more letters
for Prefix and number, only the first 7 letters are used
and dashes '-' are ZEROES, underscores '_' are ONES
ALL OTHER SYMBOLS ARE ignored.
-->: To Be or Not
The corresponding telephone number is:
862-3676
To process another telephone number, enter Y/y
Enter any other letter to terminate the program.
y
Enter a telephone number using 7 or more letters
for Prefix and number, only the first 7 letters are used
and dashes '-' are ZEROES, underscores '_' are ONES
ALL OTHER SYMBOLS ARE ignored.
-->: YRU_Here?
The corresponding telephone number is:
978-0437-
To process another telephone number, enter Y/y
Enter any other letter to terminate the program.
?