Hey there,
I am trying to create do addition subtraction multiplation and division with only one "calculate" button. The following is the code i came up with however its not working exactly the way i want it to.
protected void Button1_Click(object sender, EventArgs e)
{
int number1 = int.Parse(TxtBox.Text);
int number2 = int.Parse(TxtBox2.Text);
int sum = number1 + number2;
TxtBox3.Text = sum.ToString();
int minus = number1 - number2;
TxtBox3.Text = minus.ToString();
int multiply = number1 * number2;
TxtBox3.Text = multiply.ToString();
int divide = number1 / number2;
TxtBox3.Text = divide.ToString();
}
Also i would like to convert the answer from base10 to base20. Any hint on how can that be done ?
Cheers