Created
April 27, 2024 10:35
-
-
Save trayforyou/6a9ea93bbdc1c4acda263ae7bdb6314f 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
using System; | |
using System.Collections.Generic; | |
namespace Collections | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string inputUser; | |
Dictionary<string, string> lexicalDictionary = new Dictionary<string, string>(); | |
lexicalDictionary.Add("Мавзолей", "Большое надгробное мемориальное сооружение."); | |
lexicalDictionary.Add("Рабкор", "Рабочий корреспондент."); | |
lexicalDictionary.Add("Чапыжник", "Частый кустарник."); | |
Console.Write("Определение какого слова вы бы хотели получить: "); | |
inputUser = Console.ReadLine(); | |
if (lexicalDictionary.ContainsKey(inputUser)) | |
Console.WriteLine($"{inputUser} - {lexicalDictionary[inputUser]}"); | |
else | |
Console.WriteLine("Такое слово не известно"); | |
Console.ReadKey(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment