Question: create a c++ program that: 1. Has a main() 2. Includes the proper header and namespace declarations 3. Create a program using the following requirements:

create a c++ program that: 1. Has a main() 2. Includes the proper header and namespace declarations 3. Create a program using the following requirements: a. Request a 7-character telephone number from the user using an informational prompt and translate the characters into a 7-digit telephone number. The user will not enter the dash, the program will format the telephone number properly. For example, aaadddd would translate to 222-3333. Do not code anything for 0 or 1. This is simply to exercise knowledge of the different while loops, switches and nested loops. b. Ensure the solution is not case sensitive, i.e., the user may enter AAAADDDD or aaadddd. c. Include an outer DO-WHILE loop that asks the user if they would like to continue entering telephone numbers. If the user enters y or Y, continue. Any other entry will exit the program. d. Include an inner/nested WHILE loop that processes the entered characters until the entered characters are translated into the proper telephone number. e. Use a SWITCH statement to translate characters to numbers. If the user enters something other than A-Z or a-z, display an error message and exit the WHILE loop, continuing with asking the user if they would like to continue. f. Output/display to the console the translated telephone number. 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!