Created
October 13, 2025 18:39
-
-
Save Attosius/e35292fbf5c96aeff5d1bc6584e0cd51 to your computer and use it in GitHub Desktop.
ДЗ: Толковый словарь
This file contains hidden or 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
| using System; | |
| using System.Collections.Generic; | |
| namespace IJuniorTasks | |
| { | |
| internal class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| var explanatoryDictionary = FillDictionary(); | |
| Console.WriteLine("Введите слово для поиска:"); | |
| var userInput = Console.ReadLine(); | |
| if (explanatoryDictionary.TryGetValue(userInput.Trim().ToUpper(), out var description)) | |
| { | |
| Console.WriteLine($"Значение слова {userInput}: {description}"); | |
| } | |
| else | |
| { | |
| Console.WriteLine($"Значение слова {userInput} не найдено"); | |
| } | |
| } | |
| private static Dictionary<string, string> FillDictionary() | |
| { | |
| var explanatoryDictionary = new Dictionary<string, string> | |
| { | |
| ["ВЕТОШЬ"] = "ветхая одежда, ветхие вещи; отходы текстильного производства", | |
| ["ЙЁВИК"] = "город и коммуна в Норвегии", | |
| ["ЩЁГОЛЬ"] = "тот, кто нарядно, изысканно одевается, кто любит наряжаться; франт" | |
| }; | |
| return explanatoryDictionary; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment