请帮我编一个稍微有点复杂的vb程序算出来结果要是520。我表白要用呢,跪求高手帮忙啊!!

2024-12-27 21:12:03
推荐回答(1个)
回答1:

Option Explicit

Private Sub Form_Click()
On Error Resume Next
Dim i As Integer, a As Integer
Randomize
Me.Caption = "正在生成随机数中 ...."
Do While Not a = 10000
a = a + 1
Print Int(Rnd * (800 - 200 + 1)) + 1
Loop
Cls
Print "520"
Me.Caption = "生成结束,最后得出:520"
End Sub