这段代码中 一唯数组的10个元素是怎么倒置过来的啊?
Option ExplicitOption Base 1 '下届从1开始
Private Sub Form_Click()
Dim intCount As Integer
Dim intTemp As Integer
Const N = 10
Dim A(N) As Integer '声明一维数组A
Print "对数组赋初值"
'对数组赋初值
For intCount = 1 To N
A(intCount) = intCount '对数组赋值
Print A(intCount); '打印到窗体中
Next
Print vbCrLf '输出换行符
Print "对数组倒置"
'对数组倒置
For intCount = 1 To N \ 2
intTemp = A(intCount)
A(intCount) = A(N - intCount + 1) '数组倒置
A(N - intCount + 1) = intTemp
Next
'输出倒置后的数组
For intCount = 1 To N
Print A(intCount); '打印到窗体中
Next
Print vbCrLf
End Sub
恕本人愚笨,这是教材里的一段代码,倒置部分看不懂啊,还请哪个高手在那几句中添加个注释啊什么的,现行谢过!