Telephones

In countries like USA, is usual that the advertisers give their
telephone using letters instead of numbers. For instance, a painter can
say that his “number” is 1-800-PAINTER. Thanks to the dials like the one
in the figure, when a person use this “number”, actually dials
1-800-7246837.

[image]

Write a program that reads a “number” of telephone that includes letters
and converts it to the equivalent number that only contains numbers.

Input

Input is a “number” of telephone that can include uppercase letters,
dashes and digits.

Output

The output is the equivalent number of telephone, preserving its dashes.

Observation

Use a function to return the corresponding number to each letter.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:21:07.779Z

© Jutge.org, 2006–2026.
https://jutge.org
