试题 试卷
题型:综合题 题类:常考题 难易度:普通
浙江省杭州市五县七校2016-2017学年高二上学期期中联考信息技术试题
Private Sub Command1_Click()
Dim x as '定义 x 为整型
x = Val(Text1.Text)
Then '条件语句
Text2.Text=
Else
Text2.Text = Str(0.2 + 0.1 * (x - 3))
End If
End Sub
Private Sub Text1_Change()
Dim a, i As Integer
a= Val(Text1.Text)
For i = 2 To 6 Step 2
If a<= 15 Then a = a + i
Next i
Text1.Text = Str(a)
若在文本框Text1中输入2,执行该程序段,For语句的循环次数为( )
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)的值为( )
Dim i As Integer, s As String
i = 0
Do While i < 5
s = Str(i) + s
i = i + 1
Loop
试题篮