在ASP中,VBScript有多种控制程序流程语句,如If…Then, For … Next, Do … Loop, Exit等语句。

任意选两个语句分别写一段使用的代码,,,求代码
2025-12-17 06:40:50
推荐回答(1个)
回答1:

Private Sub Form_Load()
Dim p As Integer
Randomize
p = ""
For i = 1 To 10
Do
x = Int(Rnd * 91 + 10)
yes = 0
For j = 1 To i - 1
If x = a(i) Then
yes = 1
Exit For
End If
Loop While yes = 1

Next i
End Sub