CIS 170 (Devry) help Making Decisions/uophelp.com CIS 170 (Devry) help Making Decisions/uophelp.com | Page 17

A phone number always has a hyphen (-) in the 4th position. Make ReadDials() return –4 in this case (if it doesn't have a hyphen in the 4th position). If a hyphen is in any other position, it is considered an invalid digit. If the phone number is valid, the main calls the AcknowledgeCall function to write the converted number to the output file. All the logic of the program should be put in functions that are called from Main(): ReadDials() and AcknowledgeCall(). The ToDigits() function is called from the ReadDials() function and is used to convert each letter entered individually into a digit and to verify that the user has entered a valid phone number. Have the program work for any number of phone numbers. In the ToDigits() function uses the toupper function to convert any letters entered to uppercase. All the error messages are to be written to the output file from main() based on the return value from the functions. Continue processing until the user enters a Q. You will set up the 8 char variables to hold the digits of the phone number in main() and pass the variables to the functions by reference. Sample Output from the Program Enter a phone number (Q to quit): 213-2121 Phone Number Dialed: 213-2121 Enter a phone number (Q to quit): asc-dfer Phone Number Dialed: 272-3337 Enter a phone number (Q to quit): 555-resw ERROR - Phone number cannot begin with 555