求助~!VB选择题
Option Base 1Dim arr() As IntegerPrivate Sub Form_Click() Dim i As Integer, j As Integer
ReDim arr(3, 2)
For i = 1 To 3
For j = 1 To 2
arr(i, j) = i * 2 + j
Next j Next i
ReDim Preserve arr(3, 4)
For j = 3 To 4
arr(3, j) = j + 9
Next j
Print arr(3, 2) + arr(3, 4)
End Sub
请告诉我呢道题输出结果,是怎样得出来的?本人弄不明白啊? 输出结果:21
Option Base 1Private Sub Command1_Click()
Dim c As Integer, d As Integer
d = 0 c = 6
x= Array(2, 4, 6, 8, 10, 12)
For i = 1 To 6
If x(i) > c Then
d = d + x(i)
c = x(i)
Else
d = d - c
End If
Next i
Print d
End Sub
这题也一样??
[[it] 本帖最后由 MARK357640995 于 2008-10-27 10:32 编辑 [/it]]