试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省嘉兴市2018-2019学年高二下学期信息技术期末考试试卷一
Dim a(1 To 10) As Integer,i As Integer,j As Integer
a(1)=1
a(2)=1
For i=3 To 5
a(i)=1
For j=i-1 To 2 Step -1
a(j)=a(j)+a(j-1)
Next j
Next i
Text1.Text=Str(a(3))
该程序段运行后,在文本框Text1中显示的内容是( )
n = 0
For i = 1 To Len(Text1.Text)
c = Mid(Text1.Text, i, 1)
If c >= "0" And c <= "9" Then m = 1 Else m = 2
a(m) = a(m) + 1
If a(m) = 1 Then n = n + 1
数组a各元素的初始值都为0,文本框Text1的内容为“Happy2017”。执行程序后,变量n的值为( )
PRIVATE SUB FORMCLICK
FOR I = 3 TO {#blank#}1{#/blank#}
F=0
FOR J= 2 TO I-1
IF {#blank#}2{#/blank#} THEN
F=1
EXIT FOR
END IF
NEXT J
IF F=0 THEN {#blank#}3{#/blank#}
{#blank#}4{#/blank#}
END SUB
试题篮