dim a(5)
问题描述:
dim a(5)
for i=1 to 5
a(i)=i
next
a(1)=t
for i =2 to 5
a(i-1)=a(i)
next
a(i-1)=t
for i=1 to 5
print a(i)
next
结果是2-3-4-5-1为什么最后一个是1呢.
答
我理解题目的用意是:将1,2,3,4,5 数组的第1个元数移到最后,重新显示.我修改的代码如下:Private Sub Command1_Click() Dim a(5) For i = 1 To 5 a(i) = i Next &nb...