试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省十校联盟2020届高三上学期信息技术10月联考试卷
For i=1 To 100
For j=i To 100
If j Mod i=0 Then a(j)=a(j)+1
Next j
Next i
Text1. Text=Str(a(30))
数组a各元素的初值为0,执行上述程序段后,文本框Text中输出的内容为( )
Do While i <= n
x = Int(Rnd() * 9) + 1 If x Mod 2 = 1 Then
a(i) = x Else
a(n) = x n = n - 1
End If
i = i + 1 Loop
数组元素的初值均为 0,执行该程序段后,在下列选项中 a(1)至 a(5)各元素值不可能的是( )
Private Sub Command1_Click()
Dim s As String, a As String, t As String
s = Text1.Text: t = ""
For i = 1 To Len(s)
a = Mid(s, i, 1)
If a >= "0" And a <= "9" Then
t = t + a
ElseIf a = "!" Then
t = ""
ElseIf t <> "" Then
List1.AddItem t
End Sub
在文本框Text1中输入“12+23=35!456Ye”,单击按钮“Command1”后,在列表框List1中显示的结果是( )
Private Sub Command 1_Click()
Dim i As Integer
Dim t As Integer
Dim s As String
i = 1:t = 1:n = Text1.Text
List1.Clear
Do While t< = n
s = s + “*”
If i = t Then
List1.AddItem s
t = t + 1
i=0
i = i + 1
Loop
该算法完成的功能是( )
试题篮