Переводчик - C#
Формулировка задачи:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Char; namespace ConsoleApplication1 { class Calc { static void Main() { Dictionary<string, string> trans = new Dictionary<string, string>(); Add(string, string): trans.Add("хорошо", "good"); trans.Add("привет", "hello"); trans.Add("утро","morning"); Console.ReadKey(); } } }
Решение задачи: «Переводчик»
textual
Листинг программы
private void buttonAdd_Click(object sender, EventArgs e) { Newword newWord = new Newword(textBox3.Text,textBox4.Text); if (newWord.rus != "" && newWord.engl != "") { ruLang.Add(newWord.rus); enLang.Add(newWord.engl); File.WriteAllLines(@"C:\rus.txt", ruLang.ToArray()); File.WriteAllLines(@"C:\en.txt", enLang.ToArray()); } }
ИИ поможет Вам:
- решить любую задачу по программированию
- объяснить код
- расставить комментарии в коде
- и т.д