我已經寫出1~0的數字鍵,清除(C),負號,等於
但是-*/都不動耶?
這是我的程式碼:
Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
TextBox1.Text = TextBox1.Text & "+"
End Sub
Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
TextBox1.Text = TextBox1.Text & "-"
End Sub
Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
TextBox1.Text = TextBox1.Text & "*"
End Sub
Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click
TextBox1.Text = TextBox1.Text & "/"
End Sub
Private Sub Button17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button17.Click
Dim myArray() As String = Split(TextBox1.Text, "+")
Dim Total As Single
Total = 0
For i = 0 To UBound(myArray)
Total = Total + Val(myArray(i))
Next
TextBox1.Text = Total
End Sub
這樣為什麼減乘除會沒辦法用?
This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends: 'You Say What You Like, Because They Like What You Say' - http://www.medialens.org/index.php/alerts/alert-archive/alerts-2013/731-you-say-what-you-like-because-they-like-what-you-say.html
留言列表