试题

试题 试卷

logo

题型:单选题 题类:常考题 难易度:普通

浙江省金华市江南中学2020届高三下学期信息技术4月初测试卷

有如下VB程序段:

Dim i As Integer, sum As Integer

Dim a(1 To 6) As Integer, b(1 To 6) As Integer

sum = 0

a(6) = 18: a(5) = 7: b(6) = 14: b(5) = 16

For i = 4 To 1 Step -1

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

 b(i) = b(i + 2) - a(i)

 If b(i) Mod 3 = 0 Then sum = sum + b(i)

Next i

Text1.Text = Str(sum)

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

A、39 B、30 C、-9 D、12
举一反三
返回首页

试题篮