试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省诸暨市牌头中学2018-2019学年高二上学期信息技术期中考试试卷
m = Val(Text1.Text)
Do While m <> 0
x = m Mod 8
m = m \ 8
a(x) = a(x) + 1
If a(x) = 1 Then n = n + 1
Loop
数组a各元素的初始值都为0,在文本框Text1中输入“529”,执行程序后,变量n的值为( )
Dim a,b,c As Integer
Dim s AS string
a=9
b=41
c=2*(a+b)
s=str(b+c)
For i = 1 To 10 If d(i) >= 0 Then t=t+1 List1.AddItem Str(d(i)) Else t=t-1 List2.AddItem Str(d(i))Next则该程序段出错的原因是缺少了( )
Dim c(1 To 26) As Integer
s = Text1.Text
For i = 1 To Len(s)
x = Mid(s, i, 1)
If x >= "a" Then
t = Asc(x) - Asc("a") + 1
Else
t = Asc(x) - Asc("A") + 1
End If
_______①_________
If c(t) >= Max Then Max = c(t): _____②______
Next i
Text2.Text = Chr(f + Asc("A"))
划线处应该填入的正确语句是( )
Dim s As String, i As Integer, n As Integer
Dim ch As String, ans As Integer
s= Text1.Text
n Len(s): ans=0
For i=1 To n
ch =Mid (s, i, 1)
ans =ans *2+ Val(ch)
Text2 Text ans
若程序运行后Tex2中显示的是“38”,则Text中输入的是( )
图a
图b
试题篮