Question
The flowchart i added in the pictures works perfect on outputting the correct format for number 1. When I try to submit number 2, 3
The flowchart i added in the pictures works perfect on outputting the correct format for number 1. When I try to submit number 2, 3 and 4 of the sample outputs it keeps giving me number 1 answer. The raptor flowchart should give me every ANSWER from 1 to 4 in the SAMPLE OUTPUTS. Please help!
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:
A. Input a string including the number
B. Copy only the digits from the input string into another string
C. Issue an error message if the input string does not contain at least 10 digits
D. If the input string contains more than 10 digits, include only the first 10 digits in the formatted number
E. Output the phone number in standard format
Sample Output (inputs in bold)
1. Please enter a phone number: 817-555-1234
The properly formatted number is (817) 555-1234
2. Please enter a phone number: (817)515 7259 x23
The properly formatted number is (817) 515-7259
3. Please enter a phone number: 214-555-999
The phone number must have at least 10 digits
4. Please enter a phone number: 800**4444xxx333
The properly formatted number is (800) 444-4333
Start Please enter a phone umber:" GET phoneNum formattedPhoneNum count0 getFormattedPhoneNumber (phoneNum, count formattedPhoneNum) Loop Yee count 10 NO Thephonenumber musthave at laast 10 digits. Please enter aphonenumbr GET phoneNum getFormattedPhonaNumbar (phoneNum, count formattedPhoneum) PUT Theproperly f number is End Start Please enter a phone umber:" GET phoneNum formattedPhoneNum count0 getFormattedPhoneNumber (phoneNum, count formattedPhoneNum) Loop Yee count 10 NO Thephonenumber musthave at laast 10 digits. Please enter aphonenumbr GET phoneNum getFormattedPhonaNumbar (phoneNum, count formattedPhoneum) PUT Theproperly f number is EndStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started