Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How do I get my code to show virticle rather then horozontal? #include #include using namespace std; / / Implement the function / / with
How do I get my code to show virticle rather then horozontal?
#include
#include
using namespace std;
Implement the function
with parameter as a character
string getCodechar eachChar
Define the string input text
string text "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
string morse
;
Get the index for the character
int index text.findeachChar;
If the index is not equal to
then return index
if index
return morseindex;
Otherwise return space
else
return ;
main method
int main
Declare the string variable
string input,morseCode;
Prompt and read the word from the user
cout "Enter a word and will translate it to Morse code:";
getlinecin input;
Using forloop to get the morse code from the method
for int i ; i
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started