This is a simple C program that allows you to convert text to Morse code and vice versa.
You need to have a C compiler (e.g., gcc
) installed on your system to compile the program.
-
Open a terminal.
-
Navigate to the directory where the program is located.
-
Compile the program using the following command:
gcc morse_text_converter.c -o morse_text_converter
-
In the terminal, navigate to the directory containing the compiled program.
-
Run the program using the following command:
./morse_text_converter
-
You will be prompted to enter a string (text or Morse code).
To convert Morse code to text:
-
Input the Morse code using dots, dashes, and spaces. For example, to convert ".. .-.. --- ...- . -.-- --- ..-" to text (which represents "I LOVE YOU"), enter:
.. .-.. --- ...- . -.-- --- ..-
To convert text to Morse code:
-
Simply enter the text you want to convert. For example, to convert "HELLO" to Morse code, enter:
HELLO
The program will display the converted output accordingly.