Sayfalar - Pages

20 Kasım 2012 Salı

C# kodları ( Form Ekranı) Basit Hesap Makinesi

 Basit Hesap Makinesi ( Form Application)

KOD

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        double numb1, numb2, notice;
        private void button1_Click(object sender, EventArgs e)
        {
            numb1 = Convert.ToDouble(textBox1.Text); numb2 = Convert.ToDouble(textBox2.Text); notice = numb1 + numb2; textBox3.Text =  "" + notice;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            numb1 = Convert.ToDouble(textBox1.Text); numb2 = Convert.ToDouble(textBox2.Text); notice = numb1 - numb2; textBox3.Text =  "" + notice;
        }

        private void button3_Click(object sender, EventArgs e)
        {
            numb1 = Convert.ToDouble(textBox1.Text); numb2 = Convert.ToDouble(textBox2.Text); notice = numb1 * numb2; textBox3.Text = "" + notice;
        }

        private void button4_Click(object sender, EventArgs e)
        {
            numb1 = Convert.ToDouble(textBox1.Text); numb2 = Convert.ToDouble(textBox2.Text); notice = numb1 / numb2; textBox3.Text = "" + notice;
        }
    }
}

GÖRÜNÜM


Hiç yorum yok:

Yorum Gönder