题库 高中信息

题干

顺序查找算法程序如下,下列说法正确的是( )
Dim d(1 to 10) as Integer
n=10 : count = 0
For i = 1 To n

count = count + 1

If  Then

Label1.Caption = “顺序查找在数组的第” & i & “位找到了” & v

Exit For

End If

Next i
If  Then

Label1.Caption = “顺序查找没有找到” & v

End If
A.①处的代码为key=d(i)
B.②处的代码为i>n
C.在最好情况下,查找结束时变量count 的值为0
D.当变量count 的值为10,说明已经找到了
上一题 下一题 0.99难度 选择题 更新时间:2019-06-15 10:29:58

答案(点此获取答案解析)