当前位置: 高中信息技术 / 单选题
  • 1. (2017高三上·浙江月考) 【加试题】某排序算法的VB程序段如下:

    n = 10

    Text1.Text = ""

      For i = 1 To 5

        For j = n To i + 1 Step -1

          If a(j) < a(i) Then

            temp = a(j): a(j) = a(i): a(i) = temp

          End If

        Next j

      Next i

      For i = 1 To 10

          Text1.Text = Text1.Text + Str(a(i))

      Next i

    数组元素a(1)到a(10)的值依次为“965,155,195,444,106,734,172,983,898,360”,执行该程序段,文本框Text1中显示的是(   )

    A . 106 155 172 195 360 444 734 898 965 983 B . 106 155 172 195 360 734 444 983 898 965 C . 983 965 898 734 444 360 172 195 155 106 D . 106 155 172 195 360 965 444 734 898 983

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