组卷题库 > 高中信息技术试卷库
试题详情
【加试题】有如下VB程序段:

For i = 5 To 4 Step -1

        k = i

        For j = 6 - i To 1 Step -1

           If a(j) < a(k) Then k = j

        Next j

        If i <> k Then

           t = a(i): a(i) = a(k): a(k) = t

        End If

    Next i

数组元素a(1)到a(5)的值依次为“41,66,70,83,31”,经过该程序段“加工”后,数组元素a(1)到a(5)的值依次为(  )

A、31,41,66,83,70
B、83,70,66,41,31
C、83,66,70,41,31
D、31,41,66,70,83
知识点
参考答案
采纳过本试题的试卷
教育网站链接