试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省绍兴市诸暨中学2014-2015学年第高一下学期期中考试信息技术试题
Private Sub Command1_Click( )
Dim x As Integer,y As Integer
x = 8
y = 10^x
Text1.Text = Str(y)
End Sub
运行程序时,单击Command1后弹出如上图所示的出错提示,引起该错误的原因是( )
Private Sub Commandl_Click( )
Dim s, p As String
Dim a, n As Integer
Dim kms As Integer
s= ①
n = Len ( s ):a = 0 :kms = Val(Text2.Text)
If n Mod kms = 0 Then
For i= ②_______
p = Mid(s,i,1)
If p= "A" or p= "a" Then a = a+l
Next i
Text3.Text = Str(a)
Else
Text3.Text="学生等级信息不正确"
End If
请回答下列问题:
Dim n As Integer,s As String
n = 64 :s = ""
Do While n > 0
s = Str(n Mod 7) + s
n = n \ 7
Loop
执行该程序段后,变量s的值是( )
s = "123456789"
g = ""
For i = 1 To 3
n = Len(s)
x = Int(Rnd() * n) + 1
g = g + Mid(s, x, 1)
s = Mid(s, 1, x - 1) + Mid(s, x + 1, n - x)
在程序执行时,若变量 x 的值依次为3,3,6,则最终变量g的值为( )
试题篮