23
2
Problem:
You are making a new phone where people can type in specialized phone numbers, for example, 1-800-program
, and they would be converted automatically to a usable phone number, like 1-800-7764726
(for the previous example).
Your program will recieve a string if any length with numbers, letters and dashes, and convert all the letters to their corresponding numbers.
Here is a keypad, for reference:
Rules:
- Your program will receive a string
- It will process it and return/print another string
- Any language is accepted
- Since it is code-golf, the shortest code wins
Should the program handle both upper and lower case letters in the input? – mattnewport – 2014-02-19T00:38:10.300
3@mattnewport - no, assume the variable has been turned into lowercase already – TheDoctor – 2014-02-19T03:36:57.457