Answer:
We need to add four labels Taxable Income, Tax rate, total tax, and Total Due. And in front of them, you can add four textBoxes, or labels or as required.
The Tax rate is 5%.
And
Explanation:
BtnCalc_Click will calculate and display in lblTax
double tax = Convert.ToDouble((textBox1.Text)) * 5/100;
double Roundedtax = Math.Round(tax, 2);
textBox2.Text = Convert.ToString(Roundedtax);
textBox2.Show();
// we can use lblTax instead of textBox2. The further code will be almost change, and we need to use lblTax label instead of textBox2.Text.
BtnCalc_Click will calculate and display in lblTotal
textBox3.Text = Convert.ToString(Convert.ToDouble(textBox1.Text) + Convert.ToDouble(textBox2.Text));
textBox3.Show();
//This is lblTotal or the total Tax. We can use lblTotal label instead of the textBox3.Text.
BtnExit_Click will end the application:
Use this code in this method.
this.Close();
// This closes the application immediately on click on the Exit button.