我寫了個簡單計算器,第一次算沒有問題vb個人所得稅計算器代碼,但是第二次開始就胡來了,請幫我看下!,%lick()‘十個數字輸入'...我寫了個簡單計算器vb個人所得稅計算器代碼,第一次算沒有問題,但是第二次開始就胡來了,請幫我看下!
Dim a As , c As
Dim x%
Sub (INDEX As )‘十個數字輸入
' (INDEX). = INDEX
Text1.Text = Text1.Text & INDEX
a = Val(Text1.Text)
If x = 3 And a = 0 Then Print "除數不能為零"
End Sub
Sub ()’小數點
. = "."
Text1.Text = Text1.Text & .
. = False
End Sub
Sub (INDEX As )加減成除
. = True
If INDEX = 0 Then
x = INDEX
INDEX = 1 Then
x = INDEX
INDEX = 2 Then
x = INDEX
INDEX = 3 Then
x = INDEX
End If
c = a
Text1.Text = ""
End Sub
Sub ()‘等于
Dim msg, style, title
Case x
Case 0
Text1.Text = c + a
Case 1
Text1.Text = c - a
Case 2
Text1.Text = c * a
Case 3
Text1.Text = c / a
End
End Sub
Sub ()’C
Text1.Text = ""
End Sub