2个回答
展开全部
三个方向上元素数目相乘。
这个答案明显是被强制声明数组下标从1开始了。
计算元素个数可以采用下面的方式。
Option Base 1
Private Sub Form_Click()
Dim i As Integer, j As Integer, k As Integer
Dim count As Long
Dim a(3, -2 To 2, 5) As Integer
For i = LBound(a, 1) To UBound(a, 1)
For j = LBound(a, 2) To UBound(a, 2)
For k = LBound(a, 3) To UBound(a, 3)
count = count + 1
Next k
Next j
Next i
MsgBox count
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询