当前位置: 高中信息技术 / 单选题
  • 1. 【加试题】有如下VB程序段:

    Dim a(5) As Integer

    Dim i As Integer, j As Integer, t As Integer

    a(1) = 52: a(2) = 15: a(3) = 37: a(4) = 22: a(5) = 35

    i = 1

    Do While i < 5

        t = i: j = i + 1

        Do While j <= 5

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

            j = j + 1

        Loop

        x = a(t): a(t) = a(i): a(i) = x

        i = i + 1

    Loop

    Text1.Text = Str(a(2))

    运行该段代码后,文本框Text1中显示的内容为(   )

    A . 15 B . 22 C . 37 D . 35

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