Question: Letter to Number Converter: Create a program that reads a phone number as letters from a variable and converts it to numbers e.g. GET-LOAN =
Letter to Number Converter:
Create a program that reads a phone number as letters from a variable and converts it to numbers e.g. GET-LOAN = 438-5626 When the company uses more than 7 letters, it should convert it to 7 digits e.g. CALL-HOME = 225-5466 The resulting converted number should include the dash to separate the three digits from the four digits Hint: Use the String object charAt method to read the variable that is storing the phone number as letters.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
