问题
单项选择题
在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮,然后编写如下事件过程:
Private Sub Command1_Click( )
Dim array1(10,10)As Integer
Dim i As Integer,j As Integer
For i=1 To 3
For j=2 T0 4
Array1(i,j)=i+j
Next j
Next i
Text1.Text=array1(2,3)+array1(3,4)
End Sub
程序运行后,单击命令按钮,在文本框中显示的值是
A.15
B.14
C.13
D.12
答案
参考答案:D
解析: 根据"array1(i,j)=i+j"可知:array1(2,3)的值为5,array1(3,4)的值为7,相加的结果为12。