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

    k = 0

    For i = 1 To 10

        If b(a(i)) = 0 Then k = k + 1

        b(a(i)) = b(a(i)) + 1

    Next i

    For i = 1 To k

        p = 1

        For j = 2 To 10

           If b(j) > b(p) Then p = j

        Next j

        b(p) = 0

        s = s + Str(p)

    Next i

    数组a(1)~a(10)的元素分别为2,5,3,8,8,5,8,9,5,3。数组b(1)~b(10)的元素初始值均为0,执行程序后,变量s的值为(   )

    A . " 5 8 3 2 9" B . " 2 3 5 8 9" C . " 8 5 3 9 2" D . " 2 9 3 5 8"

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