CIS 170C iLab 4 of 7 Functions (100% Correct) CIS 170C iLab 4 of 7 Functions (100% Correct) | Página 4

This should be a lot of fun! Here are some great things to think about as you begin your program! Define a function named ReadDials() that reads each digit and letter dialed into 8 separate char variables (DO NOT USE ARRAYS). All the digits are sent back through parameters by reference. Then, for each digit, the program will use a function named ToDigit(), which receives a single char argument (pass by reference) that may be a number or a letter of one of the digits dialed. If it is a number, then return 0 by value indicating that it is a valid digit. If the digit is a letter, then the number corresponding to the letter is returned by reference, and return 0 by value indicating that it is a valid digit. Here are the letters associated with each digit. 0 5 J K L 1 6 M N O 2 A B C 7 P Q R S 3 D E F 8 T U V 4 G H I 9 W X Y Z If the digit entered is not one of the valid digits or one of the valid letters, return –1 by value indicating that you have an invalid digit. A phone number never begins with a 0, so the program should flag an error if such a number is entered. Make ReadDials() return –2 in this case.