题库 高中信息

题干

某查找算法的部分VB代码如下:
shifouzhaodao = False  ‘shifouzhaodao:是否找到
szysxh = 0    ‘szysxh:数组元素序号
Do While szysxh < 5 And not shifouzhaodao
szysxh =" szysxh" + 1
if dczsz(szysxh) =" Key" then shifouzhaodao = true
Loop
if not shifouzhaodao then szysxh = 0
数组元素dczsz (1)到dczsz (5)的数据依次为“-1,3,7,10,7”,当变量key值为7时,运用该算法处理后,变量i的值是( )
A.0B.-1C.3D.5
上一题 下一题 0.99难度 选择题 更新时间:2015-08-21 04:13:22

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