Lab #09 Flowchart Many websites ask for phone numbers. The problem is that there are many different

Lab #09 Flowchart Many websites ask for phone numbers. The problem is that there are many different

Lab #09 Flowchart
Many 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 number
2. Copy only the digits from the input string into another string
3. Issue an error message if the input string does not contain at least 10 digits
4. If the input string contains more than 10 digits, include only the first 10 digits in the formatted number
5. Output the phone number in standard format
Notes:
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-1234
The properly formatted number is (817) 555-1234
Please enter a phone number: (817)515 7259 x23
The properly formatted number is (817) 515-7259
Please enter a phone number: 214-555-999
The phone number must have at least 10 digits
Please enter a phone number: 800**4444xxx333
The 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."

Essay Writing Service
Affordable prices

You might be focused on looking for a cheap essay writing service instead of searching for the perfect combination of quality and affordable rates. You need to be aware that a cheap essay does not mean a good essay, as qualified authors estimate their knowledge realistically. At the same time, it is all about balance. We are proud to offer rates among the best on the market and believe every student must have access to effective writing assistance for a cost that he or she finds affordable.

Caring support 24/7

If you need a cheap paper writing service, note that we combine affordable rates with excellent customer support. Our experienced support managers professionally resolve issues that might appear during your collaboration with our service. Apply to them with questions about orders, rates, payments, and more. Contact our managers via our website or email.

Non-plagiarized papers

“Please, write my paper, making it 100% unique.” We understand how vital it is for students to be sure their paper is original and written from scratch. To us, the reputation of a reliable service that offers non-plagiarized texts is vital. We stop collaborating with authors who get caught in plagiarism to avoid confusion. Besides, our customers’ satisfaction rate says it all.

© 2022 Homeworkcrew.com provides writing and research services for limited use only. All the materials from our website should be used with proper references and in accordance with Terms & Conditions.

Scroll to Top