试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省杭州市2016年信息技术高考模拟卷十三
Private Sub Command1_C1ick ( )
Dim a(0 to 5) As Integer
a(5)=Val(Text1.text)
For I=4 to 1 step -1
a(I)=a(I+1)/2
Next I
Text2.text=str(a(I))
End sub
在文本框Text1中输入“96”,单击命令按钮Command1后,文本框Text2中显示的内容是( )
Private Sub Command1_Click()
Dim sjzs As Integer
Dim rjzs As String
sjzs = Val(Text1.Text)
rjzs = ""
Do While Int(sjzs / 2) > 0
rjzs = Str(sjzs Mod 2) + rjzs
sjzs = Int(sjzs / 2)
Loop
Label1.Caption = rjzs
End Sub
Private Function f(x As Single, n As Integer) As Single
If n =0 Then
f =1
Else
If n Mod 2 =1 Then
f=x * f(x, n\2)
f=f(x, n\2) \x
End If
End Function
Label1.Caption=Str(f(4, 6))
程序运行时,单击按钮Command1,标签Label1显示的内容是( )
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)
Next j
⑶
Next i
Text2.Text = s
试题篮