请高手帮忙修改一个小程序
在一位数组中利用移位的方法显示如下的结果:1 2 3 4 5 6 7
7 1 2 3 4 5 6
6 7 1 2 3 4 5
5 6 7 1 2 3 4
4 5 6 7 1 2 3
3 4 5 6 7 1 2
2 3 4 5 6 7 1
1 2 3 4 5 6 7
本人编程如下:
Private Sub Form_Click()
Dim a(1 To 7)
Dim i As Integer, j As Integer, t As Integer
For i = 1 To 7
a(i) = i
Print a(i);
Next i
For i = 1 To 7
t = a(7)
For j = 6 To 1
a(j + 1) = a(j)
Next j
a(1) = t
For j = 1 To 7
Print a(j);
Next j
Next i
End Sub
运行后得不到正确的结果,请高手们帮忙修改,不胜感激!!