Write a program that simulates the dial of a phone number. The program will accept a phone number as input, and it will acknowledge the call by either writing an error message or the 8 digit phone number to the console window. The phone number may have either digits, letters, or both.
Here are the letters associated with each digit.
0 5 J K L
1 6 M N O
2 A B C 7 P Q R S
3 D E F 8 T U V
4 G H I 9 W X Y Z
A phone number never begins with a 0 or 555, so the program should flag an error if such a number is entered. A phone number always has a hyphen (-) in the 4th position. If a hyphen is in any other position, it is considered an invalid digit. If the phone number is valid, write the converted number to the output file.
The program should process any number of phone numbers until the user enters a Q.
Please refer to the attachment for sample input-output session with the program, and the pseudo code, using which the C++ code has to be written for this simulation.
Attachment:- Program pseudocode.docx