Private Sub Command1_Click()
Dim s As Single,x As Single,n As Integer,i As Integer
Randomize
List1.Clear
s=Val(Text1.Text)
n=
For i=1 To
x=Int((Rnd()*s/(n-i)+0.005)*100)/100
List1.AddItem Str(x)
s=
Next i
x=Int((s+0.005)*100)/100
List1.AddItem Str(x)
End Sub
For i = 1 To 6
a(i) = Int(Rnd() * 10) + 1
If a(i) Mod 2 = i Mod 2 Then
a(i) = a(i) + 1
Else
a(i) = a(i) Mod 2
End If
Next i
执行该程序段后,在下列选项中,a(1)~a(6)各元素可能的值是( )
Dim s As String, c As String
Dim i As Integer, n As Integer, p As Integer
s = Text1.Text
n = Len(s)
p = 1
For i = 1 To n
c = Mid(s, i, 1)
If c >= "A" And c <= "Z" Then
t = c + t
Else
t = Mid(t, 1, p - 1) + c + Mid(t, p, Len(t) - p + 1)
p = p + 1
End If
Next i
Text2.Text = t
如果文本框Text1中输入“ABCD@1234”,则文本框Text2中输出( )
For i=1To n
h(i)=Int(Rnd * 20 + 1)
num(i)=1:ans=0
For j=1 To i
If h(j) < h(i) And num(j) >=num(i) Then
num(i)=num(j) + 1
end if
next j
Next i
执行该程序段后,在下列选项中,num (1)~num (8)各元素值可能的是( )
Const mw = "0123456789"
S = Text1.Text: s1 = "":s2 = ""
For i=1 To Len(s)
C = Mid(s,i,1)
If c >= "0" And c <= "9" Then
s1 = s1 + c
ElseIf c = "-" Then
s2 = s2 + s1 + c
s1 = ""
Else
End If
Next i
① t =(Val(c)+5) Mod 10
② c = Mid(mw,t,1)
③ s1 = c + s1
④ t=(Val(c)+4) Mod 10+1
⑤ c= Mid(mw,t+1,1)
⑥ s1 = s1 + c
则填空处的代码应该是( )