#C186. Morse Code Translator
Morse Code Translator
Morse Code Translator
In this problem, you will convert a string of Morse code into plain English letters and digits. The input is given as a string where each Morse code character is separated by a single space. Words are separated by three spaces.
For example, the Morse code .... . .-.. .-.. --- .-- --- .-. .-.. -..
should be translated to HELLO WORLD.
You are required to read the entire Morse code from standard input and output the corresponding translation to standard output.
inputFormat
The input consists of a single line read from standard input. This line contains a Morse code message made up of dots (.), dashes (-), and spaces. A single space separates Morse characters, and three consecutive spaces separate words.
outputFormat
Output the decoded plain English text corresponding to the Morse code input. The output should be written to standard output.
## sample.... . .-.. .-.. ---
HELLO