feat(PI114): add askUserSentence method for user input
Add a new static method that prompts the user to enter a sentence to decipher, reads the input from console, and displays it back. This method will be used to gather user input for the morse code translation feature.
This commit is contained in:
1 file changed
+7
@@ -90,4 +90,11 @@ class PI114
|
||||
letterToMorse.Add("9", "----.");
|
||||
letterToMorse.Add(" ", "/");
|
||||
}
|
||||
static void askUserSentence()
|
||||
{
|
||||
Console.Write("Entrez votre phrase à déchiffrer : ");
|
||||
string userText = Console.ReadLine();
|
||||
Console.WriteLine();
|
||||
Console.WriteLine(userText);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user