Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- namespace dictionary
- {
- class Program
- {
- static void Main(string[] args)
- {
- Dictionary<string, string> dictionary = new Dictionary<string, string>();
- dictionary.Add("габитус", "Совокупность внешних признаков, внешний вид");
- dictionary.Add("гавана", "Гаванская сигарета");
- dictionary.Add("гавот", "Старинный французский танец");
- dictionary.Add("гаврик", "Жуликоватый человек, пройдоха");
- dictionary.Add("гага", "Полярная морская нырковая утка с ценным пухом");
- Console.Write("Введите слово: ");
- string userWord = Console.ReadLine();
- if (dictionary.ContainsKey(userWord))
- Console.WriteLine($"Значение: {dictionary[userWord]}");
- else
- Console.WriteLine("слово отсутствует в словаре");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement