当前位置: 高中信息技术 / 单选题
  • 1. (2020高二上·上海月考) 有如下程序段:

    Const n = 10

    Dim a(1 To 10) As Integer

    m = Int(Rnd * n + 1)

    For i = 1 To 10

      a(i) = 0

    Next i

    i = 0: j = 0: c = 1: ans = ""

    Do While c <= 3

      i = i Mod n + 1

      If a(i) = 0 Then j = j + 1

      If j = m Then

        a(i) = 1: c = c + 1

          j = 0: ans = ans + Str(i)

      End If

    Loop

    Text1.Text = ans

    执行上述程序段后,文本框Text1中不可能的内容是(    )

    A . 2 4 6 B . 7 4 2 C . 5 10 6 D . 6 2 8

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