试题 试卷
题型:单选题 题类: 难易度:容易
江苏省普通高中学业水平合格性考试信息技术模拟卷(十)
图1
图2
图3
For i = 1 To 3
For j = 1 To 10
If j Mod i = 0 Then a(j) = 1 - a(j)
Next j
Next i
sum = 0
For i = 1 To 10
sum = sum + a(i)
已知数组a的所有元素初值均为0,运行上述程序段后,变量sum的值是( )
Private Sub Command1_Click()
Dim a(0 To 4) As Integer
Dim i As Integer
a(4) = Val(Text1.Text)
For i = 3 To 1 Step -1
a(i) = a(i + 1) / 2
Text2.Text = Str(a(i+2))
End Sub
试题篮