当前位置: 高中信息技术 / 单选题
  • 1. (2020高三下·金华月考) 某VB程序段如下:

    Dim a (1 To 6) As Integer

    Randomize

    a(1) = Int (Rnd*2) + 1

    For i = 2 To 6

      a(j) = Int (Rnd*i) *2 + 1

      If a(i) < a(i-1) Then

        a(i) = a(i) + a(i-1)

      End If

    Next i

    执行该程序段后,数组元素a(1)到a(6)的值可能是(  )

    A . 2,4,6,8,10,12 B . 1,1,3,7,12,23 C . 2,5,9,11,10,15 D . 1,3,15,16,20,23

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