试题 试卷
题型:单选题 题类:模拟题 难易度:普通
浙江省杭州市2015年高考模拟命题比赛信息技术(1)
Private Sub Command1_Click()
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
Dim a as Integer
a=Val(Text1.text) ‘将文本框中的数字文本转换成数值
a=2*a+1
Text1.text = StrA.
程序运行时在文本框Text1中输入1,连续两次单击命令按钮Command1后,Text1中显示的内容是:( )
Private Sub Command1_click ( )
Dim n As Integer , m As Integer , k As Integer
n = Len ( Text1.Text )
m = Val ( Text2.Text )
k = Val ( Text3.Text )
If m + k -1 > n Then
Text4.Text = Mid ( Text1.Text , 1 , m – 1 )
Else
Text4.Text = Mid ( Text1.Text , 1 , m–1 ) + Mid ( Text1.Text , m+k , n–m–k +1 )
End If
Function s(n As Integer) As Integer
If n=1 Then
s=1
s=s(n-1)+n
End Function
Private Sub Form_Click()
Dim x As Integer
x=s(4)
Print x
程序运行时,单击窗体后,变量x的值为( )
DIM A(6) AS INTEGER
FOR I= 1 TO 6
A(I)= I
NEXT I
PRINT A(I)
f=[‘A’,‘B’,‘C’]
a=len(f)
print(‘a=’,a)
试题篮