当前位置: 高中信息技术 / 单选题
  • 1. (2017高三上·温州期中) 【加试题】有如下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

微信扫码预览、分享更方便