c++ code with comments 10.17: Morse Code Converter Morse code is a code where ea
ID: 3934947 • Letter: C
Question
c++ code with comments
10.17: Morse Code Converter 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 10-8 from the textbook shows part of the code. Write a program that asks the user to enter a string , and then converts that string to Morse code. Note that Morse code represents both upper and lower case letters so that both 'A' and 'a' will be converted to ".-". Prompts And Output Labels. The program prints the message "Enter a word and I will translate it to Morse code." and then, on the next line displays the following prompt: "-> ". The remainder of the line is read in and treated as a singlestring and output converted to Morse Code using table 10-8. Each converted character is printed on a line by itself.Characters that are not found in the table result in "UNDEFINED" being printed. Input Validation. None.
Explanation / Answer
I don't have table 10-8 for reference. I will still proceed with the taken conversion standards :
Here is the code. If you have to replace any sign or character, you can do that easily. Happy coding !!!
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.