Scrolly
ALPHABETIC TELEPHONE NUMBER TRANSLATOR for Class
I have been trying to figure this out for a few days now. Here is the full question:
"Many companies use telephone numbers like 555-GET-FOOD so the
number is easier for their customers to remember. On a standard
telephone, the alphabetic letters are mapped to numbers in the
following fashion:
A, B, and C = 2
D, E, and F = 3
G, H, and I = 4
J, K, and L = 5
M, N, and O = 6
P, Q, R, and S = 7
T, U, and V = 8
W, X, Y, and Z = 9
Create an application that lets the user enter a 10-character
telephone number in the format XXX-XXX-XXXX . The
application should display the telephone number with any
alphabetic characters that appeared in the original translated to
their numeric equivalent. For example, if the user enters 555-
GET-FOOD, the application should display 555-438-3663."
I am very new to c# and understand basic code. I am able to code it to where it accepts the inputted Alphabetic phone number converted it to a char array. I am sure I have to use some type of foreach loop or something like that. I have a good idea on what I am supposed to do, but I cannot put it into code. I have tried looking up the question and found a few solutions, but I do not understand all of it (which is important to me). Also, I will be launching it with the click of a button
private void button1_Click(object sender, EventArgs e)
136 replies