Need help with Raptor flowcharts, I will later need to write a C++ program that does the same thing. So far have input to string, a test if it is a number then write to another string, but if characters other than a number are entered it still records a space..How do I get around that
Many websites ask for phone numbers. The problem is that there are many 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 US phone number in any format and outputs it in the international
standard format. The international standard for US phone numbers is -
Your Raptor program should:
1. Input a string including the number
2. Copy only the digits from the input string into another string
3. If the input string contains more than 10 digits, include only the first 10
digits in the formatted number
4. If the input string contains less than 10 digits replace the missing digits
with lower case x.
5. Output the phone number in the international standard format
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 +1-817-555-1234
Please enter a phone number: (817)515 7259 x23
The properly formatted number is +1-817-515-7259
Please enter a phone number: 214-555-99
The properly formatted number is +1-214-555-99xx
Please enter a phone number: 800**4444xxx333
The properly formatted number is +1-800-444-4333
I did a 'net search on RAPTOR Flowcharts ( https://duckduckgo.com/?q=raptor+flowcharts&t=ffsb&ia=web ), and the app has virtually nothing to do with C++ programming. More to do with an alternate way to program other than using a conventional programming language, if that, more about learning to use and understand programming flowcharts.
A C/C++ fora was probably not the best place to get support on this software, but really was no need to close out the account.
RAPTOR, Windows only, and originally developed by the U.S. Air Force Academy, Department of Computer Science. O-o-o-o-o-o-kay!