当前位置: 高中信息技术 / 单选题
  • 1. (2020高三下·浙江开学考) 有如下VB程序段:

    Dim a(1 To 10) As Integer

    Dim i, j As Integer

    For i = 1 To 10

        j = i

        Do While j <= 10

            If j Mod i = 0 Then

                a(j) = a(j) + 1

            End If

            j = j + 1

        Loop

    Next i

    Text1.Text = Str(a(3))

    数组a各元素初值为0,执行上述程序段后,文本框Text1中显示的内容为(    )

    A . 1 B . 2 C . 3 D . 4

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