Guest User

Untitled

a guest
Feb 21st, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. Public Class Form2
  2.  
  3. Private Sub SubmitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
  4.  
  5. Dim TaxRate, Tax, Income As Decimal
  6. Dim Married As Boolean
  7.  
  8.  
  9.  
  10. Income = Decimal.Parse(IncomeTextBox.Text)
  11.  
  12.  
  13. If Form1.MarriedCheckBox.Checked = True Then
  14. Married = True
  15. Else
  16. Married = False
  17. End If
  18.  
  19.  
  20. If Married = True Then
  21. If Income > 150000D Then
  22. TaxRate = 0.3D
  23. Else
  24. TaxRate = 0.25D
  25. End If
  26. Else
  27. If Income > 100000D Then
  28. TaxRate = 0.2D
  29. Else
  30. TaxRate = 0.15D
  31. End If
  32. End If
  33.  
  34. Tax = Income * TaxRate
  35. TaxLabel.Text = CStr(Tax)
  36.  
  37.  
  38. End Sub
  39. End Class
Add Comment
Please, Sign In to add comment