Lab #09 Flowchart Many websites ask for phone numbers. The problem is that there are many different ways to represent a phone number.

Master the Art of Resume Writing: Expert Tips and Tricks
September 10, 2023
Differences between the film frankenstein and the novel
September 10, 2023
Show all

Lab #09 Flowchart Many websites ask for phone numbers. The problem is that there are many different ways to represent a phone number.

Lab #09 Flowchart Many websites ask for phone numbers. The problem is that there are many different ways to represent a phone number.

Lab #09 FlowchartMany websites ask for phone numbers. The problem is that there are many different ways to represent a phone number. Examples include 817-555-1234, 817 555 1234 (c), and (817) 555-1234 x23. Write a Raptor program which inputs a string containing a phone number in any format and outputs it in the standard format. For this assignment, the standard format is (817) 555-1234.Your Raptor program should:1. Input a string including the number2. Copy only the digits from the input string into another string3. Issue an error message if the input string does not contain at least 10 digits4. If the input string contains more than 10 digits, include only the first 10 digits in the formatted number5. Output the phone number in standard formatNotes:1. In Raptor, a string is just an array of characters.2. Lesson #9 has an example of working with strings in Raptor.3. When only digits are input, Raptor assumes it is an integer instead of a string. Your flowchart does not need to properly handle an input like 8175551234, but your C++ version does need to handle that.4. I recommend passing the digits only string to a procedure which outputs it in the standard format.Sample Output (inputs in bold)Please enter a phone number: 817-555-1234The properly formatted number is (817) 555-1234Please enter a phone number: (817)515 7259 x23The properly formatted number is (817) 515-7259Please enter a phone number: 214-555-999The phone number must have at least 10 digitsPlease enter a phone number: 800**4444xxx333The properly formatted number is (800) 444-4333
Lab #09 C++
using the flowchart for Lab #09 as a guide, write a C++ program that also inputs a phone number and displays it in the standard format, (817) 555-1234. Your program may use either C-Strings or the C++ string Class, but should not mix them. Chapter 10 has examples using both kinds of strings.
Test your program to make sure it works properly, and then upload just the .cpp file.
“96% of our customers have reported a 90% and above score. You might want to place an order with us.”

Rate this post

"Do you need a similar assignment done for you from scratch? We have qualified writers to help you with a guaranteed plagiarism-free A+ quality paper. Discount Code: SUPER50!"

order custom paper