一年级加减法训练怎么改?
Private Sub Command1_Click()Text1(0) = Int(Rnd() * 20)
Text1(1) = Int(Rnd() * 20)
Text1(3) = Int(Rnd() * 20)
Text1(4) = Int(Rnd() * 20)
Text1(7) = Int(Rnd() * 20)
Text1(8) = Int(Rnd() * 20)
If Val(Text1(0)) > Val(Text1(1)) Then
Label1 = "-"
Else
Label1 = "+"
End If
If Val(Text1(3)) > Val(Text1(4)) Then
Label6 = "-"
Else
Label6 = "+"
End If
If Val(Text1(8)) > Val(Text1(7)) Then
Label7 = "-"
Else
Label7 = "+"
End If
Text1(2) = ""
Text1(5) = ""
Text1(6) = ""
Label3 = ""
Label4 = ""
Label9 = ""
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Command3_Click()
If Text1(0) > Text1(1) Then
If Val(Text1(2)) = Val(Text1(0)) - Val(Text1(1)) Then
Label3 = "√"
Else
Label3 = "×"
End If
Else
If Val(Text1(2)) = Val(Text1(0)) + Val(Text1(1)) Then
Label3 = "√"
Else
Label3 = "×"
End If
End If
If Text1(3) > Text1(4) Then
If Val(Text1(5)) = Val(Text1(3)) - Val(Text1(4)) Then
Label4 = "√"
Else
Label4 = "×"
End If
Else
If Val(Text1(5)) = Val(Text1(3)) + Val(Text1(4)) Then
Label4 = "√"
Else
Label4 = "×"
End If
End If
If Text1(8) > Text1(7) Then
If Val(Text1(6)) = Val(Text1(8)) - Val(Text1(7)) Then
Label9 = "√"
Else
Label9 = "×"
End If
Else
If Val(Text1(6)) = Val(Text1(8)) + Val(Text1(7)) Then
Label9 = "√"
Else
Label9 = "×"
End If
End If
End Sub
执行起来有问题,但又不知道错在哪儿?请大家帮忙看下,谢谢!!
[ 本帖最后由 rose998 于 2010-3-28 15:00 编辑 ]