问题 单项选择题

在窗体上绘制一个名称为Commandl的命令按钮,然后编写如下程序:
Option Base 1
Private Sub Commandl_Click()
Dim c As Integer,d As Integer
d=0
c=6
x=Array(2,4,6,8,10,12)
Fori=1 To 6
1fx(i)>c Then
d=d+x(i)
c=x(i)
Else
d=d-c
End If
Nexti
Print d
End Sub
程序运行后,如果单击命令按钮,则在窗体上输出的内容为( )。

A.10
B.16
C.12
D.20

答案

参考答案:C

单项选择题 A1型题
填空题