VB中1到20的数相互交换1和20换,2和19换

问题描述:

VB中1到20的数相互交换1和20换,2和19换

Private Sub Command1_Click()
Dim a(20), b(20)
For i = 1 To 20
a(i) = i
Next i

For j = 0 To 10
t = a(j)
a(j) = a(20 - j)
a(20 - j) = t
Print a(j)
Next j
End Sub