Dim yes As Integer, tm As Integer
Private Sub Command1_Click() '出题
tm = tm + 1
Text1.Text = Int(9000 * Rnd) + 1000
Text2.Text = Int(900 * Rnd) + 100
Text3.Text = ""
Label1.Caption = ""
Label2.Caption = ""
End Sub
Private Sub Command2_Click() '答题
x = Val(Text1.Text)
y = Val(Text2.Text)
If Val(Text3.Text) = x + y Then
yes = yes + 1
Label2.Caption = "√"
Label1.Caption = "恭喜您,进入下一题"
Else
Label2.Caption = "×"
Label1.Caption = "很遗憾,正确答案是" & x + y
End If
Label3.Caption = "正确率=" & Format(yes / tm, "0.##%")
End Sub
以上就是与手机号后4位数相加测试以及手机号后4位数相加测试怎么测的相关内容,也是关于完成四位数和三位数的相加测试,急!的分享。看完手机号后4位数相加测试一文后,希望这对大家有所帮助!
全站搜索