Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

no phone number is smaller than than 7 digits, and no number group is smaller than 2 digits. 4. (15 pts) Write a program that

image text in transcribed
no phone number is smaller than than 7 digits, and no number group is smaller than 2 digits. 4. (15 pts) Write a program that allows the user to input a character string from the keyboard, and tell the user if that string complies with the US phone number grammar. Your program should output that string, followed by "YES" if the string is acceptable, and "NO" if it is not. So, an example output from this program could be: alpne numbers in countries other than the S. Assume that (757) 555-1234 YES Your program must give the correct (Yes/No) answer when presented with the following phone numbers: 757-555-0025 (757)555-1234 75-555-0000 757.555.1234 757-043-1234 057-555-1234 057-MH5-1234 ooram laruage inC+

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

More Books

Students also viewed these Databases questions