Last active
April 21, 2024 18:34
-
-
Save kyzalex/ea447dca4c20b785cc80465d9450c79d to your computer and use it in GitHub Desktop.
Толковый словарь
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Dictionary<string, string> dictionary = new Dictionary<string, string>(); | |
dictionary.Add("кукуруза", "культурное растение семейства злаков"); | |
dictionary.Add("картофель", "вид многолетних клубненосных травянистых растений из рода Паслён"); | |
dictionary.Add("свекла", "Корнеплод, растение с толстыми корнями, которые богаты органическими веществами"); | |
Console.Write("Ведите слово :"); | |
string word = Console.ReadLine(); | |
if (dictionary.ContainsKey(word)) | |
{ | |
Console.WriteLine($"{word} - {dictionary[word]}"); | |
} | |
else | |
{ | |
Console.WriteLine("Такого слова нет в словаре!"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment