Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string[] alphabet = new string[] { "а", "б", "в", "г", "ґ", "д", "е", "є", "ж","з", "и", "і", "ї", "й", "к", "л","м", "н", "о",
- "п", "р", "с","т", "у", "ф", "х", "ц", "ч", "ш", "щ", "ь", "ю", "я", ",", ".", " " };
- if (radioButton1.Checked)
- {
- string text_before_cr = textBox1.Text;
- textBox2.Text = "";
- foreach (char letter in text_before_cr)
- {
- for (int i = 0; i < alphabet.Length; i++)
- {
- if (letter.ToString().ToLower() == alphabet[i] && i < alphabet.Length - 6)
- {
- textBox2.Text += alphabet[i + 6];
- }
- else if (letter.ToString().ToLower() == alphabet[i] && i > alphabet.Length - 7)
- {
- textBox2.Text += alphabet[i - 6];
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement