Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- //A dictionary is stored as a sequence of text lines containing words and their explanations.
- //Write a program that enters a word and translates it by using the dictionary. Sample dictionary:
- //.NET – platform for applications from Microsoft
- //CLR – managed execution environment for .NET
- //namespace – hierarchical organization of classes
- class Dictionary
- {
- static void Main()
- {
- Dictionary<string,string> dic = new Dictionary<string,string>();
- dic.Add(".NET", "platform for applications from Microsoft");
- dic.Add("CLR", "managed execution environment for .NET");
- dic.Add("namespace", "hierarchical organization of classes");
- Console.WriteLine("Enter one of the words - .NET, CLR, namespace: ");
- string input = Console.ReadLine();
- Console.WriteLine("{0} - {1}",input,dic[input]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement