private void button1_Click(object sender, EventArgs e) { var CR = new Creater(); int m = 1; string[] inw = new string[m]; string[] n = new string[1]; int N = Convert.ToInt32(textBox1.Text); n[0] = N.ToString(); CR.Write("Input.txt", n); n = CR.Read("Input.txt"); N = Convert.ToInt32(n[0]); inw = CR.Creat_seq(N); textBox2.Clear(); textBox3.Clear(); textBox4.Clear(); textBox5.Clear(); textBox2.Text += inw[0]; textBox3.Text += inw[2]; textBox4.Text += inw[1]; textBox5.Text += inw[3]; }
private void button1_Click(object sender, EventArgs e) { var CR = new Creater(); int m = 1; //string[] inq = new string[m]; double[] r = new double[16] { 3.841, 5.991, 7.815, 9.488, 11.070, 12.592, 14.067, 15.507, 16.919, 18.307, 19.675, 21.026, 22.362, 23.685, 24.996, 26.296 }; string[] outq = new string[m]; int F = 0; int Q = 0; int N = 0; int Per = 0; int f = 0; N = Convert.ToInt32(textBox1.Text); F = Convert.ToInt32(textBox3.Text); Q = Convert.ToInt32(textBox4.Text); outq = CR.Creat_seq(N, Q, F); for (int i = 0; i < outq.Length; i++) { textBox2.Text += outq[i] + " "; } Per = CR.Peroid(outq); textBox5.Text = Per.ToString(); if (CR.Ver_Pirs(outq, r)) { textBox6.Text = "Да"; } else { textBox6.Text = "Нет"; } for (int i = 0; i < outq.Length; i++) { richTextBox1.Text += outq[i] + " "; f++; if (f == Per) { richTextBox1.Text += Environment.NewLine; f = 0; } } }