private void button1_Click(object sender, EventArgs e)
{
double a = Convert.ToDouble(textBox1.Text);
double b = Convert.ToDouble(textBox2.Text);
textBox3.Text = (a+b).ToString("f8");
}
private void button2_Click(object sender, EventArgs e)
{
double a = Convert.ToDouble(textBox1.Text);
double b = Convert.ToDouble(textBox2.Text);
textBox3.Text = (a - b).ToString("f8");
}
private void button3_Click(object sender, EventArgs e)
{
double a = Convert.ToDouble(textBox1.Text);
double b = Convert.ToDouble(textBox2.Text);
textBox3.Text = (a * b).ToString("f8");
}
private void button4_Click(object sender, EventArgs e)
{
double a = Convert.ToDouble(textBox1.Text);
double b = Convert.ToDouble(textBox2.Text);
if(b==0)
textBox3.Text = "B = 0";
else
textBox3.Text = (a / b).ToString("f8");
}
|