The international standard letter/number mapping for telephones is shown below. DEF 123 ABC GHI JKL MNO 456 PORS TUV WXYZ 7 89 0 # * Write a complete C++ program that prompts the user to enter a phone number as a string. The input number may contain numbers and letters. The program should translate all letters (uppercase or lowercase) into digits and leaves the numbers intact. For example, SaskTel's Technical Support line (as listed on its Web site) is "1.800.SASKTEL". When the letters are mapped into digits, it becomes "1.800.7275835". In this example, if the user enters "1800SAKTEL", your programs should output "18007275835". Hint: It is recommended to have user defined function(s) in your program. For example, you may write a function that returns a number, given an uppercase letter, as follows: int getNumber (char uppercaseLetter).

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 8PE: Write a program that reads in a line consisting of a students name, Social Security number, user ID,...
icon
Related questions
Topic Video
Question
100%
C++ language
The international standard letter/number mapping for telephones is shown below.
АВС
DEF
1 2 3
GHI
JKL
MNO
4 5 6
PQRS
TUV
WXYZ
7
89
0 #
Write a complete C++ program that prompts the user to enter a phone number as a string.
The input number may contain numbers and letters. The program should translate all
letters (uppercase or lowercase) into digits and leaves the numbers intact.
For example, SaskTel's Technical Support line (as listed on its Web site) is "1.800.SASKTEL".
When the letters are mapped into digits, it becomes "1.800.7275835".
In this example, if the user enters "1800SAKTEL", your programs should output
"18007275835".
Hint: It is recommended to have user defined function(s) in your program. For example, you
may write a function that returns a number, given an uppercase letter, as follows:
int getNumber(char uppercaseLetter).
2
Transcribed Image Text:The international standard letter/number mapping for telephones is shown below. АВС DEF 1 2 3 GHI JKL MNO 4 5 6 PQRS TUV WXYZ 7 89 0 # Write a complete C++ program that prompts the user to enter a phone number as a string. The input number may contain numbers and letters. The program should translate all letters (uppercase or lowercase) into digits and leaves the numbers intact. For example, SaskTel's Technical Support line (as listed on its Web site) is "1.800.SASKTEL". When the letters are mapped into digits, it becomes "1.800.7275835". In this example, if the user enters "1800SAKTEL", your programs should output "18007275835". Hint: It is recommended to have user defined function(s) in your program. For example, you may write a function that returns a number, given an uppercase letter, as follows: int getNumber(char uppercaseLetter). 2
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr