Question: Write a program in C that does the following: Asks the user to enter a phone number using the format (xxx) xxx-xxxx. Displays the phone
Write a program in C that does the following:
Asks the user to enter a phone number using the format (xxx) xxx-xxxx. Displays the phone number entered by the user in the format xxx.xxx.xxxx Determines whether the number is a Charlotte number (704) and displays a message to indicate this. Include logic to display an error if the user does not enter the number in the correct format.
Sample Output:
Enter a telephone number using the format (xxx) xxx-xxxx
(704) 586-7071
You entered: 704.586.7071
This is a Charlotte phone number.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
