Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
2.0 kB
0
Indexable
Never
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 Nümerik_Analiz_1.ÖDEV
{
    public partial class frm_KİRİS : Form
    {
        public frm_KİRİS()
        {
            InitializeComponent();
        }

        KIRIS denklem_1 =new KIRIS();   
        KIRIS denklem_2=new KIRIS();


        private void BTN_HESAPLA_1_Click(object sender, EventArgs e)
        {
            rtb_1.Clear();
            double x0 = Convert.ToDouble(txt_x0.Text);
            double x1 =Convert.ToDouble(txt_x1.Text);
            double E = Convert.ToDouble(txt_x0.Text);

            var sonuclar=denklem_1.DogrusalInterpolasyon_1(x0, x1, E);

            double kök = sonuclar.Item1;
            List<double> iterasyonlar=sonuclar.Item2;

            txt_kök_1.Text = kök.ToString();

            for (int i = 0; i < iterasyonlar.Count; i++)
            {
                rtb_1.AppendText((i + 1) + ". İTERASYON=" + iterasyonlar[i] + "\n");
            }

        }

        private void BTN_HESAPLA_2_Click(object sender, EventArgs e)
        {
            rtb_2.Clear();
            double x0 = Convert.ToDouble(txt_x0_2.Text);
            double x1 = Convert.ToDouble(txt_x1_2.Text);
            double E = Convert.ToDouble(txt_x0_2.Text);

            var sonuclar = denklem_1.DogrusalInterpolasyon_2(x0, x1, E);

            double kök = sonuclar.Item1;
            List<double> iterasyonlar = sonuclar.Item2;

            txt_kök_2.Text = kök.ToString();

            for (int i = 0; i < iterasyonlar.Count; i++)
            {
                rtb_2.AppendText((i + 1) + ". İTERASYON=" + iterasyonlar[i] + "\n");
            }
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            Application.Exit();

        }
    }
}
Leave a Comment