单项选择题

在一个窗体上添加一命令按钮控件,名为Command1,事件过程如下,则执行结果是( )。

Option Base 1

Private Sub Command1_Click()

Dim a(5) As Integer

Dim k As Integer

Dim total As Integer

a(1)=2

a(2)=5

a(3)=4

a(4)=10

a(5)=6

For k=1 To 5

total=total+a(k)

Next k

Print total

End Sub

A.10
B.15
C.27
D.35