试题 试卷
题型:单选题 题类:模拟题 难易度:普通
浙江省杭州市2016年信息技术高考模拟卷四
Private Sub Command1Click()
Dim a(1 To 4) As Integer
Dim i As Integer
a(1) = 1
For i = 2 To 4
a(i) = 2 * a(i - 1) + 1
Next i
List1.AddItem Str(a(i))
End Sub
Private Sub Command1_Click()
n = 6
x = 1
For i =1 To n
x = x * i
Next
End Sub( )
Dim a(1 To 5) As Integer, i As Integer
a(1)=1: a(2)=1
For i=3 To 5
a(i)=a(i-1)+a(i-2)
Text1.Text=Str(a(i-1))
该程序段运行后,文本框Textl中显示的内容是( )
Dim s As String, s1 As String, c As String
s = Text1.Text
For i = 1 To Len(s)
c = Mid(s, i, 1)
s1 = ⑴
For j = ⑵
If c <> Mid(s, j, 1) Then
s1 = s1 + Mid(s, j, 1)
End If
Next j
⑶
Text2.Text = s
Dim r As Single, s As Single '①
r="10米" '②
s=3.14159*r*r '③
Text2.Text ="某个半径为"+ Str(r)+"米的圆,其面积为"+ Str(s)+"平方米." '④
则程序中出错的语句是( )
试题篮