请问,有谁能帮我修改一下代码,使得下面代码能显示出加减乘除 的结果是否正确?
Inherits System.Web.UI.PageProtected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim n, m, op As Integer
Dim x As New Random
Label3.Text = ""
n = Convert.ToInt16(100 * x.NextDouble())
m = Convert.ToInt16(100 * x.NextDouble())
TextBox1.Text = n.ToString()
TextBox2.Text = m.ToString()
op = Convert.ToInt16(1 + 3 * x.NextDouble())
Select Case (op)
Case 1
Label1.Text = "+"
Case 2
Label1.Text = "-"
Case 3
Label1.Text = "*"
Case 4
Label1.Text = "/"
End Select
End Sub
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
If (Convert.ToInt16(TextBox1.Text) + Convert.ToInt16(TextBox2.Text) = Convert.ToInt16(TextBox3.Text)) Then
Label3.Text = "正确"
Else
Label3.Text = "错误"
End If
End Sub
End Class