则下列说法正确的是( )
Dim a(1To 5)As Integer
i=1:n=5
Randomize
For i=1 To n
x=Int(Rnd*10)*2+1
If(x Mod 10+x\10)Mod 2=0 Then
a(i)=x
Else
a(n-i+1)=x
End If
Next i
数组元素的初值均为0,执行该程序段后,a(1)至a(5)的值可能的是( )
对于文字“坐馆”处的操作,下列说法正确的是( )
Dim a(l To n) As Integer,y(l To n) As Integer, i As Integer, j As Integer
k=Val(Text1.Text)
For i=1 To n
y(i)=1
Next i
For i=1 To n
For j=1 To n
If a(i) < a(j) Then y(i)=y(i)+1
Next j
If y(i)=k Then List1.AddItem Str(a(i))
Next i
数组 a 的各元素的值为3,4,3,1,4,4,5,5,6,2,0, 在文本框中输入4,执行该段程序后 List1 中显示的值为( )
i = 0: j = 1
Do While j <= 5
If a(j) <> 0 Then i = i + 1: a(i) = a(j)
j = j + 1
Loop
For j = i + 1 To 5
a(j) = 0
Next j
数组元素a(1)到a(5)的值依次为“0,20,0,4,31”,执行该程序段后,a(1)~a(6)各元素的值依次为( )
下列说法正确的是( )
s=Text1. Text
s1=" "
For i=1 To Len(s)
c= Mid(s, i, 1)
If c>= "A" And c <= "Z" Then
c= Chr(Asc(c)+ 32)
ElseIf c>="a"Andc<(="z"Then
c=Chr( Asc(c)-32)
End If
s1=c+s1
Next i
Text2. Text=s1
该程序段运行后,若在文本框Text1中输入 “Ab12CD”,则 文本框Text2中显示的内容是( )
Dim s1 As String, s2 As String Dim c As Integer, i As Integer s1 = InputBox("请输入一串字符") s2 = "" c = Len(s1) For i = ▲ s2 = Mid(s1, i, 1) + s2 Next i Print s2 | 【函数功能提示】 ⑴函数Len(x)的功能是:取字符串x的长度值(即字符个数值)。 若x="abc",则Len(x)的值为3。 ⑵函数Mid(x,y,z)的功能是:在字符串x中第y个字符开始取z个字符。 若x="abcdefg",则 Mid(x,4,3)取得的值是"def"。 |
程序空白处应填写的语句是:。