Menu

Write Program Translates Alphabetic Phone Number Numeric Form Using C Based Character Arra Q43787168

In C++

Write a program that translates an alphabetic phone number into numeric form using C-based character arrays: Enter Phone Numb

Write a program that translates an alphabetic phone number into numeric form using C-based character arrays: Enter Phone Number: Numeric Form: CALLATT 2255288 In case you do not have your cell phone handy, remember that: 1..@. 2 – ABC, 3 = DEF 4 = GHI, 5 = JKL, 6 = MNO, 7 PQRS, 8 = TUV, 9 = WXYZ. If the original phone number contains non- alphabetic characters besides the ones listed for the number 1 (., ‘, or @’), your program should leave the results unchanged. For example: Enter Phone Number: Numeric Form: 1-800-COL-LECT 1-800-265-5328 You may assume that any letters entered into your program by the user could upper or lower case. Specifications: The program needs to store the original phone number in array of characters. The program also needs to store the numeric number in a second array of characters. You may assume that the phone number is no more than 15 characters long, and any letters that are entered into the program by the user may be upper or lower case. Define a constant N for your array size and use it throughout your program. If you execute the program, the following information should be displayed: 1-800-765-5234 1-800-765-5328 > main.o Enter Phone Number: Numeric Form: > main.o Enter Phone Number: Numeric Form: -> main.o Enter Phone Number: Numeric Form: 1800KrIeHn 7 18005743467 011886INTERNTL. 011886468376851 HINT: You will need to initialize your two arrays with the NULL(” ‘) character (ASCII Code 0) so that if you do not print out 15 numbers, you will not print out junk values left over in other elements in the arrays. You will need to use a while() loop to read in your characters, and use a for() loop for your conversion. You may also find a switch() statement to be extremely useful… Show transcribed image text Write a program that translates an alphabetic phone number into numeric form using C-based character arrays: Enter Phone Number: Numeric Form: CALLATT 2255288 In case you do not have your cell phone handy, remember that: 1..@. 2 – ABC, 3 = DEF 4 = GHI, 5 = JKL, 6 = MNO, 7 PQRS, 8 = TUV, 9 = WXYZ. If the original phone number contains non- alphabetic characters besides the ones listed for the number 1 (., ‘, or @’), your program should leave the results unchanged. For example: Enter Phone Number: Numeric Form: 1-800-COL-LECT 1-800-265-5328 You may assume that any letters entered into your program by the user could upper or lower case. Specifications: The program needs to store the original phone number in array of characters. The program also needs to store the numeric number in a second array of characters. You may assume that the phone number is no more than 15 characters long, and any letters that are entered into the program by the user may be upper or lower case. Define a constant N for your array size and use it throughout your program. If you execute the program, the following information should be displayed: 1-800-765-5234 1-800-765-5328 > main.o Enter Phone Number: Numeric Form: > main.o Enter Phone Number: Numeric Form: -> main.o Enter Phone Number: Numeric Form: 1800KrIeHn 7 18005743467 011886INTERNTL. 011886468376851 HINT: You will need to initialize your two arrays with the NULL(” ‘) character (ASCII Code 0) so that if you do not print out 15 numbers, you will not print out junk values left over in other elements in the arrays. You will need to use a while() loop to read in your characters, and use a for() loop for your conversion. You may also find a switch() statement to be extremely useful…

Expert Answer


Answer to Write a program that translates an alphabetic phone number into numeric form using C-based character arrays: Enter Phone…

OR