CIS 170 (Devry) help Making Decisions/uophelp.com CIS 170 (Devry) help Making Decisions/uophelp.com | Page 18
Enter a phone number (Q to quit): 098-8765
ERROR - Phone number cannot begin with 0
Enter a phone number (Q to quit): 12345678
ERROR - Hyphen is not in the correct position
Enter a phone number (Q to quit): @34-*uyt
ERROR - An invalid character was entered
Enter a phone number (Q to quit): Q
Press any key to continue . . .
Step 2: Processing Logic
Using the pseudocode below, write the code that will meet the
requirements.
Main Function
Declare the char variables for the 8 digits of the phone number
while true
Call the ReadDials function passing the 8 digits
by reference. ReadDials returns an error code by
value.
If the return value is -5, exit the do while loop
If the error code is -1, display the
error message "ERROR - An invalid character was entered".