Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ program that reads a list of telephone numbers expressed in capital letters from a text file and converts the telephone numbers in

Write a C++ program that reads a list of telephone numbers expressed in capital letters from a text file and converts the telephone numbers in capital letters, to the corresponding telephone numbers in digits. Each converted phone number should be displayed on the console in both formats, alphabetic and digital. At the same time, the program creates another file in which the telephone numbers appear in digital format, one number per line. Allow the user to specify the name of the input file, as well as the name of the output file. Apply the following convention: If a number consists of more than seven letters, only the first seven letters are processed. A space is displayed between the third and fourth digits. Letters A, B and C corresponds to digit 2; letters D, E and F to digit 3; letters G, H and I to digit 4; letters J, K and L to digit 5; letters M, N and O to digit 6; letters P, Q R and S to digit 7; letters T, U and V to digit 8; and letters W, X, Y and Z to digit 9. If any other character is encountered, a * is displayed. The input file contains the following data, with one number per line: CALL HOME GET LOAN Hi THERE BYE FOR NOW HELP ME PAS

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

7-16 Compare Web 2.0 and Web 3.0.

Answered: 1 week ago