组卷题库 > 高中信息技术试卷库
试题详情
数组a中依次存放6个有序数据“23 33 44 55 66 77”。

Dim a(1 To 10) As Integer

Dim s As String, n, key As Integer

a(1) = 23: a(2) = 33: a(3) = 44: a(4) = 55: a(5) = 66: a(6) = 77

i = 1: j = 6: c = 0: key = 35

Do While i <= j

    c = c + 1

    m = (i + j) \ 2

    If (j - i + 1) Mod 2 = 0 Then m = m + 1

    If a(m) = key Then Exit Do

    If key < a(m) Then j = m - 1 Else i = m + 1

Loop

该程序段运行后,下列各变量的值不正确的是:(    )

A、i=3
B、j=2
C、c=3
D、m=2
知识点
参考答案
采纳过本试题的试卷
教育网站链接