试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙教版高一信息技术 专题五:VB程序设计
i=1:j=10:temp=a(5)
Do While a(j)>temp
j=j-1
Loop
Do While a(i)<temp
i=i+1
temp=a(i):a(i)=a(j):a(j)=temp
数组元素a⑴到a(10)的值依次为“36 91 36 17 93 99 2 9 97 97”,执行该程序段后,a(5)的值为( )
Dim a(1 To 5) As Integer, i As Integer, c As Integer
a(1)=2:a(2)=1:a(3)=3:a(4)=4:a(5)=5
c=0
For i=3 To 5
If a(i-2)+a(i-1)=a(i) Then c=c+1
Next i
Text1.Text=Str(c)
该程序段运行后,文本框Text1中显示的内容是( )
a(1)=1:a(2)=1
b(1)=1:b(2)=2
for i=3 to 5
a(i)=a(i-1)+a(i-2)
b(i)=b(i-1)+a(i)
next i
执行该段程序后,数组元素b(5)的值为( )
试题篮