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 hesap_makinesi
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
decimal a = Convert.ToDecimal(textBox1.Text);
decimal b = Convert.ToDecimal(textBox2.Text);
decimal sonuc = 0;
sonuc = a + b;
label3.Text = "" + sonuc;
label4.Text = "Kullandığınız için teşekkürler";
}
private void button2_Click(object sender, EventArgs e)
{
decimal a = Convert.ToDecimal(textBox1.Text);
decimal b = Convert.ToDecimal(textBox2.Text);
decimal sonuc = 0;
sonuc = a - b;
label3.Text = "" + sonuc;
label4.Text = "Kullandığınız için teşekkürler";
}
private void button3_Click(object sender, EventArgs e)
{
decimal a = Convert.ToDecimal(textBox1.Text);
decimal b = Convert.ToDecimal(textBox2.Text);
decimal sonuc = 0;
sonuc = a * b;
label3.Text = "" + sonuc;
label4.Text = "Kullandığınız için teşekkürler";
}
private void button4_Click(object sender, EventArgs e)
{
decimal a = Convert.ToDecimal(textBox1.Text);
decimal b = Convert.ToDecimal(textBox2.Text);
decimal sonuc = 0;
if (a > b)
{
sonuc = a / b;
}
else
{
sonuc = b / a;
}
label3.Text = "" + sonuc;
label4.Text = "Kullandığınız için teşekkürler";
}
// Bu çok basit dediğiniz duyar gibiyim evet haklısnız ama emeklemeyi
öğrenmeden koşamayız demi ama!!!
// forma ekleyeceğiz toolbox lar (4 tane label),(4tane buton),(2 tane
textbox) bukadar
}
}
