Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
