试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省温州十五校联合体2019-2020学年高一下学期信息技术期中考试试卷
a = a + b b = a - b a = a - b
下列选项中,和以上程序段功能相同的是( )
s = ""
For i = 1 To 5
a(i) = 0
Next i
For i = 2 To 5
For j = i To 5
If j Mod i = 0 Then a(j) = 1 - a(j)
Next j
If a(i) = 1 Then s = s + Str(i)
Text1.Text = s
运行该程序段后,Text1中显示的内容为( )
PRIVATE SUB FORM_CLICK
DIM A(4,4) AS INTEGER
FOR I = 1 TO 4
FOR J= 1 TO 4
IF {#blank#}1{#/blank#}
A(I,J)=1
{#blank#}2{#/blank#}
A(I,J)=0
END IF
PRINT A(I,j);
{#blank#}3{#/blank#}
PRINT
{#blank#}4{#/blank#}
END SUB
Dim c As Integer,a(0 To 5) As Integer
a(i) = i
c = 0
x = Int(Rnd * 5 + 1)
If a(x Mod 5) = i + 2 Then c = c + 1
If c = x Then Exit For
i = i - 1
运行该程序后,变量c的值不可能是( )
转换方法:先从右往左将二进制数分割成 4 位一组,若最左边的一组不足4位,则用 0 将高位补足,然后将每 4 位二进制数转换为 1 位十六进制数。
试题篮