示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Polinom pol = new Polinom(richTextBox1.Lines, richTextBox1.Lines.Length, richTextBox1.Lines[0].Split(' ').Select(double.Parse).ToArray().Length, richTextBox2.Lines, richTextBox2.Lines.Length, richTextBox2.Lines[0].Split(' ').Select(double.Parse).ToArray().Length);

            textBox2.Text = Math.Round(pol.ans[0], 4).ToString();
            textBox3.Text = Math.Round(pol.ans[1], 4).ToString();
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Polinom p = new Polinom(textBox1.Text);

            textBox2.Text = "f(x) = " + p.print(p.polinom);
            textBox3.Text = "f'(x) = " + p.print(p.der);
            textBox4.Text = string.Join(" ", p.der);
        }