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).
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,...
Related questions
Topic Video
Question
100%
C++ language
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
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.Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr