Sorularınıza en iyi çözümleri Kalademi.me'da bulun, güvenilir Q&A platformu. Platformumuz, tüm sorularınıza net yanıtlar sunmaya hazır profesyonellerle sizi bir araya getiriyor. Sorularınıza hemen güvenilir yanıtlar bulmak için deneyimli uzman topluluğumuzdan faydalanın.

c# dili yazılmak kaydıyla basit bi hesap makinesi yapımı yardımlar için teşekkürler şimdiden



Sagot :

tamamdır dostum Bİ teşekkür lütfen             

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

 

namespace WindowsApplication2

{

    public partial class Form1 : Form

    {

//Tanımlamalarımız.

        int  sayi1,sayi;

        string isaret = “”;

        bool isaret1;

        public Form1()

        {

            InitializeComponent();

        }

 

        private void button10_Click(object sender, EventArgs e)

        {

//Rakamların Girisi

//Rakam 0

            if (isaret1 == true)

                textBox1.Text = “0″;

            else

                if (textBox1.Text == “0″)

                    textBox1.Text = “0″;

                else

                    textBox1.Text = textBox1.Text + “0″;

            isaret1 = false;

 

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

//Rakam 1

            if (isaret1 == true)

                textBox1.Text = “1″;

            else

                if (textBox1.Text == “0″)

                    textBox1.Text = “1″;

                else

                    textBox1.Text = textBox1.Text + “1″;

            isaret1 = false;

 

        }

 

        private void button2_Click(object sender, EventArgs e)

        {

//Rakam 2

            if (isaret1 == true)

                textBox1.Text = “2″;

            else

                if (textBox1.Text == “0″)

                    textBox1.Text = “2″;

                else

                    textBox1.Text = textBox1.Text + “2″;

            isaret1 = false;

 

        }

 

        private void button3_Click(object sender, EventArgs e)

        {

//Rakam 3

            if (isaret1 == true)

                textBox1.Text = “3″;

            else

                if (textBox1.Text == “0″)

                    textBox1.Text = “3″;

                else

                    textBox1.Text = textBox1.Text + “3″;

            isaret1 = false;

 

        }

 

        private void button4_Click(object sender, EventArgs e)

        {

//Rakam 4

            if (isaret1 == true)

                textBox1.Text = “4″;

            else

                if (textBox1.Text == “0″)

                    textBox1.Text = “4″;

                else

                    textBox1.Text = textBox1.Text + “4″;

            isaret1 = false;

 

        }

 

        private void button5_Click(object sender, EventArgs e)

        {

//Rakam 5

            if (isaret1 == true)

                textBox1.Text = “5″;

            else

                if (textBox1.Text == “0″)

                    textBox1.Text = “5″;

                else

                    textBox1.Text = textBox1.Text + “5″;

            isaret1 = false;

 

        }

 

 

        private void button6_Click(object sender, EventArgs e)

        {

//Rakam 6

            if (isaret1 == true)

                textBox1.Text = “6″;

            else

                if (textBox1.Text == “0″)

                    textBox1.Text = “6″;

                else

                    textBox1.Text = textBox1.Text + “6″;

            isaret1 = false;

        }

 

        private void button7_Click(object sender, EventArgs e)

        {

//Rakam 7

            if (isaret1 == true)

                textBox1.Text = “7″;

            else

                if (textBox1.Text == “0″)

                    textBox1.Text = “7″;

                else

                    textBox1.Text = textBox1.Text + “7″;

            isaret1 = false;

 

        }

 

        private void button8_Click(object sender, EventArgs e)

        {

//Rakam 8

            if (isaret1 == true)

              textBox1.Text = “8″;

else

if (textBox1.Text == “0″ )

textBox1.Text = “8″;

else

textBox1.Text = textBox1.Text + “8″;

isaret1 = false;

 

        }

 

        private void button9_Click(object sender, EventArgs e)

        {

//Rakam 9

            if (isaret1 == true)

textBox1.Text = “9″;

else

if (textBox1.Text == “0″ )

textBox1.Text = “9″;

else

textBox1.Text = textBox1.Text + “9″;

isaret1 = false;

 

        }

 

        private void button11_Click(object sender, EventArgs e)

        {

//C ‘Yani Silme Butonumuz

            isaret1 = false;

            isaret = “”;

            textBox1.Text = “0″;

 

        }

 

        private void button12_Click(object sender, EventArgs e)

        {

//+ “Toplama” Butonumuz

            if (isaret == “”)

                sayi = Convert.ToInt32(textBox1.Text);

            else

            {

                sayi1 = Convert.ToInt32(textBox1.Text);

 

                if (isaret == “+”) { sayi = sayi + sayi1; textBox1.Text = Convert.ToString(sayi); }

 

            }

            isaret1 = true;

            isaret = “+”;

 

        }

 

        private void button13_Click(object sender, EventArgs e)

        {

//- “Çıkarma” Butonumuz

            if (isaret == “”)

                sayi = Convert.ToInt32(textBox1.Text);

            else

            {

                sayi1 = Convert.ToInt32(textBox1.Text);

 

                if (isaret == “-”) { sayi = sayi – sayi1; textBox1.Text = Convert.ToString(sayi); }

 

            }

            isaret1 = true;

            isaret = “-”;

 

        }

 

        private void button14_Click(object sender, EventArgs e)

        {

// * “Çarpma” Butonumuz

            if (isaret == “”)

                sayi = Convert.ToInt32(textBox1.Text);

            else

            {

                sayi1 = Convert.ToInt32(textBox1.Text);

 

                if (isaret == “*”) { sayi = sayi * sayi1; textBox1.Text = Convert.ToString(sayi); }

 

            }

            isaret1 = true;

            isaret = “*”;

 

        }

 

        private void button15_Click(object sender, EventArgs e)

        {

//    / “Bölme” Butonumuz

            if (isaret == “”)

                sayi = Convert.ToInt32(textBox1.Text);

            else

            {

                sayi1 = Convert.ToInt32(textBox1.Text);

 

                if (isaret == “/”) { sayi = sayi / sayi1; textBox1.Text = Convert.ToString(sayi); }

            }

            isaret1 = true;

            isaret = “/”;

        } 

       private void button16_Click(object sender, EventArgs e)

        {

// = “Eşittir” Butonumuz

            isaret1 = true;

            sayi1 = Convert.ToInt32(textBox1.Text);

            if (isaret == “+”) { sayi = sayi + sayi1; textBox1.Text = Convert.ToString(sayi); }

            if (isaret == “-”) { sayi = sayi – sayi1; textBox1.Text = Convert.ToString(sayi); }

            if (isaret == “*”) { sayi = sayi * sayi1; textBox1.Text = Convert.ToString(sayi); }

            if (isaret == “/”) { sayi = sayi / sayi1; textBox1.Text = Convert.ToString(sayi); }

 

        }           

    }

}

Ziyaretiniz için teşekkür ederiz. İhtiyacınız olan en iyi bilgileri sunmayı taahhüt ediyoruz. Daha fazla bilgi için geri dönün. Zamanınızı ayırdığınız için minnettarız. En güncel bilgi ve sorularınıza yanıtlar almak için istediğiniz zaman geri dönün. Sorularınız için Kalademi.me burada. Yeni yanıtlar için geri dönmeyi unutmayın.