试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省诸暨市牌头中学2017-2018学年高二下学期信息技术第一次月考试题
Private Sub Command1_Click()
Dim a(0 To 5) As Integer
Dim i As Integer ’①
a(0) = 1 '②
For i = 1 To 5
a(i) = 2 * a(i - 1) + 1 '③
Next i
Text1.Text = Str(a(6)) '④
End Sub
s=0
For i=1 To 5 Step-2
s=s+i
执行上述代码后,下列说法正确的是( )
i = 1
Do While i <= 6
t = Int(Rnd * 10) + 1
If t Mod 2 = i Mod 2 Then a(i) = t : i = i + 1
Loop
For i = 1 To 2
k = 1
For j = 1 To 6 - i * 2
If a(j) * k > a(j + 2) * k Then
t = a(j) : a(j) = a(j + 2) : a(j + 2) = t
End If
k = -k
Next j
执行该程序段后,数组元素a(1)到a(6)的值可能是( )
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
①全0块“0000”,可以化简为“0”
②连续多个全0块,可以化简为“::”
③一个IPv6地址中只能出现一个“::”,出现多个全0块时,“::”要化简最长的一段,没有最长的就将最左侧的一段化简为“::”
④“::”可以出现在地址开头或结尾
具体示例如下:
程序界面如图所示:
实现上述功能的VB程序如下,请回答下列问题:
试题篮