CIS 170C iLab 4 of 7 Functions (100% Correct) CIS 170C iLab 4 of 7 Functions (100% Correct) | Page 5

A phone number never begins with 555, so the program should flag an error if such a number is entered. Make ReadDials() return –3 in this case. 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