Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace _31
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Button1_Click(object sender, EventArgs e)
- {
- label1.Text = "";
- label2.Text = "";
- int k,f,p;
- int.TryParse(textBox1.Text, out k);
- char[] array = new char[k];
- char[] array2 = new char[k];
- char[] array3 = new char[] { 'а', 'е', 'и', 'ё', 'ю', 'я', 'о', 'у', 'ы' };
- p = 0;
- Random rnd = new Random();
- for (int i = 0; i < array.Length; i++)
- {
- array[i] = Convert.ToChar(rnd.Next('а', 'а' + 33));
- label1.Text = label1.Text + " " + array[i];
- if (!array3.Any(u => u == array[i]))
- {
- array2[p] = array[i];
- label2.Text = label2.Text + ' ' + array2[p].ToString();
- p++;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement