Problem

Morse Code ConverterWrite a program that asks the user to enter a string and then converts...

Morse Code Converter

Write a program that asks the user to enter a string and then converts that string to Morse code. Morse code is a code where each letter of the English alphabet, each digit, and various punctuation characters are represented by a series of dots and dashes. Table 8-15 shows part of the code.

Table 8-15 Morse code

Character

Code

Character

Code

Character

Code

Character

Code

space

space

6

-….

G

--.

Q

--.-

comma

--..--

7

--…

H

….

R

.-.

period

.-.-.-

8

---..

I

..

S

question mark

..-..

9

----.

J

.---

T

-

0

-----

A

.-

K

-.-

U

..-

1

.----

B

-…

L

.-..

V

…-

2

..---

C

-.-.

M

--

W

.--

3

…--

D

-..

N

-.

X

-..-

4

....-

E

.

O

---

Y

-.--

5

…..

F

..-.

P

.--.

Z

--..

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT