Lösningsförslag till uppgift 7.4¶
Dictionary<string, string> ord = new Dictionary<string, string>();
ord["hej"] = "hi";
ord["dator"] = "computer";
ord["tangentbord"] = "keyboard";
ord["mus"] = "mouse";
Console.WriteLine("Skriv in ett av orden hej, dator, tangentbord eller mus");
string svar = Console.ReadLine();
Console.WriteLine($"{svar} heter {ord[svar]} på engelska");