用语句Dim A (-3 To 7) As Integer定义的数组的元素个数是().
下列程序段的执行结果为(). Dim A(4) As Integer A(1) = 1 For k = 0 To 2 For i = 1 To k + 1 X = k + 2 - i A(X) = A(X) + A(X - 1) If k < 2 Then Exit For Print A(X); Next Next
下列程序的输出结果为(). Private Sub Command1_Click() Dim a(20) as Integer For j=1 To 20 Step 2 A(j)=j Next j Print a(1)+a(2)+a(3) End Sub
语句Dim a&(1 T0 20),b#(2,-1 To 1)定义的两个数组,其类型区别为().
Dim a(3,-3 To 0,3 To 6)As String语句定义的数组元素有().
设有数组声明语句: Option Base0 Dim b(-l To 10,2 To 9,20)As Integer 则数组B中共有()个元素.
在窗体上画一个命令按钮(其Name属性为Command1),然后编写如下代码: Option Base 1 Private Sub Command1_Click() Dim a(4,4) As Integer For i=1 To 4 For j=1 To 4 A(i,j)=(i-1)∗3+j Next j Next i For i=3 To 4 For j=3 To 4 Print a(j,i); Next j Next i End Sub 程序运行后,单击命令按钮,其输出结果为().
有以下的语句: Option Base 1 Dim xscj(3,4,5) As String 声明的数组xscj有()个数组元素.
下列程序段的执行结果为(). Dim M(2) As Integer For i=l To 2 M(i)=0 Next i K=2 For i=1 To k For j=1 To k M(j)=M(i)+1 Print M(k); Next j Next i
设有数组说明语句:Dim c(-1 To 1,1 T0 5),则下列表示数组c的元素选项中正确的是().
以下()是Visual Basic合法的数组元素.
如下数组声明语句:Dim a(3,-2 To 2,5),则数组a包含的元素的个数为().
语句Dim abc(-2 To 4,0 To 4,5)As Long定义的三维数组,其数组元素有().
用下面语句定义的数组的元素个数是(). Dim A (-2 To 4) As Integer
在窗体上画一个名称为Command1的命令按钮,然后编写如下程序: Option Base 1 Private Sub Command1_Click() Dim a As Variant A= Array(1, 2, 3, 4, 5) Sum = 0 For i = 1 To 5 Sum = Sum + a(i) Next i X= Sum / 5 For i = 1 To 5 If a(i) > x Then Print a(i); Next i End Sub 程序运行后,单击命令按钮,在窗体上显示的内容是().