当前位置: 高中信息技术 / 单选题
  • 1. (2021·湖州模拟) 有如下 VB 程序段:

    i = 6: flag = True

    Do While i >= 4 And flag = True

        flag = False

        k = i

        For j = 1 To i - 1

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

        Next j

        If k <> i Then

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

            flag = True

        End If

        i = i - 1

    Loop

    数组元素a(1)到a(6)的值依次为:“19,6,34,40,13,53”,执行该程序段后,数组元素a(1)到a(6)的值依次为(    )

    A . 19,53,34,40,13,6 B . 53,40,34,19,13,6 C . 40,53,34,19,13,6 D . 19,6,34,13,40,53

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