private void button1_Click(object sender, EventArgs e) { // double xin, int it, double to, int c, double x, double xrr, double er, double der double xini = Convert.ToDouble(textBox1.Text); int iter = (int)Convert.ToSingle(textBox3.Text); double tole = Convert.ToSingle(textBox2.Text); Newton_Raphson newton = new Newton_Raphson(xini, iter, tole); Solución solu = newton.Calcular(); label10.Text = solu.iteru.ToString(); label11.Text = solu.sol.ToString(); label2.Text = Convert.ToDecimal(solu.erel).ToString(); label13.Text = solu.Error; if (solu.Error == null) { textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; } }
private void button1_Click(object sender, EventArgs e) { float izq = Convert.ToSingle(textBox1.Text); float der = Convert.ToSingle(textBox2.Text); int iter = (int)Convert.ToSingle(textBox3.Text); float tole = Convert.ToSingle(textBox4.Text); Bisección = new Bisección(izq, der, iter, tole, 0, 0, 0, 0); Solución solu = Bisección.Calcular(izq, der, iter, tole); label10.Text = solu.iteru.ToString(); label11.Text = Convert.ToDecimal(solu.erel).ToString(); label12.Text = solu.sol.ToString(); label13.Text = solu.Error; if (solu.Error == null) { textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = ""; } }