所得 2010.9.29
所得 2010.9.29
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim pay_tax, income As Integer
Dim flags As Boolean
flags = True
pay_tax = 0
If IsNumeric(TextBox1.Text) Then
income = Val(TextBox1.Text)
Select Case income
Case Is <= 370000
pay_tax = income * 0.06
Case 370001 To 990000
pay_tax = income * 0.13 - 25900
Case 9900001 To 1980000
pay_tax = income * 0.21 - 105100
Case 198001 To 3720000
pay_tax = income * 0.3 - 283300
Case Is >= 3720001
pay_tax = income * 0.4 - 655300
Case Else
flags = False
End Select
If flags = True Then
Label2.Text = "所得稅" & pay_tax.ToString & "元"
Else
Label2.Text = "金額有問題請檢查"
End If
Else
Label2.Text = "金額請輸入數字性資料"
End If
End Sub
End Class
Dim pay_tax, income As Integer
Dim flags As Boolean
flags = True
pay_tax = 0
If IsNumeric(TextBox1.Text) Then
income = Val(TextBox1.Text)
Select Case income
Case Is <= 370000
pay_tax = income * 0.06
Case 370001 To 990000
pay_tax = income * 0.13 - 25900
Case 9900001 To 1980000
pay_tax = income * 0.21 - 105100
Case 198001 To 3720000
pay_tax = income * 0.3 - 283300
Case Is >= 3720001
pay_tax = income * 0.4 - 655300
Case Else
flags = False
End Select
If flags = True Then
Label2.Text = "所得稅" & pay_tax.ToString & "元"
Else
Label2.Text = "金額有問題請檢查"
End If
Else
Label2.Text = "金額請輸入數字性資料"
End If
End Sub
End Class
這個論壇的權限:
您 無法 在這個版面回復文章