Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form2
- Private Sub SubmitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
- Dim TaxRate, Tax, Income As Decimal
- Dim Married As Boolean
- Income = Decimal.Parse(IncomeTextBox.Text)
- If Form1.MarriedCheckBox.Checked = True Then
- Married = True
- Else
- Married = False
- End If
- If Married = True Then
- If Income > 150000D Then
- TaxRate = 0.3D
- Else
- TaxRate = 0.25D
- End If
- Else
- If Income > 100000D Then
- TaxRate = 0.2D
- Else
- TaxRate = 0.15D
- End If
- End If
- Tax = Income * TaxRate
- TaxLabel.Text = CStr(Tax)
- End Sub
- End Class
Add Comment
Please, Sign In to add comment