You are on page 1of 1

decimal first = Convert.ToDecimal(FirstNumberTextBox.

Text);
decimal second = Convert.ToDecimal(SecondNumberTextBox.Text);

decimal result = 0;

if(AddRadioButton.Checked == true)
{
result = first + second;
}

else if (SubtractRadioButton.Checked == true)


{
result = first - second;
}
else if (MultiplicationRadioButton.Checked == true)
{
result = first * second;
}
else
{
result = first / second;
}
ResultTextBox.Text = result.ToString();

if(result > 100)


{
MessageBox.Show("Value Greater Than 100");
}
else
{
MessageBox.Show("Value Less Than 100");
}

You might also like