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

    Dim i As Integer, Sum As Integer

    Dim a(1 To 11) As Integer

    Sum = 6

    a(11) = 49

    For i = 10 To 1 Step -1

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

        If a(i) Mod 3 = 0 Then Sum = Sum + a(i)

    Next i

    Text1.Text = Str(Sum)

    该程序段运行后,文本框text1中显示的内容是(   )

    A . 174 B . 180 C . 36 D . 42

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