有关数组的问题,请教各位
欲显示如下数组: 但是代码的结果是:1 0 0 1 0 0 0 1 0 0 0 1
0 1 0
0 0 1
请问如何修改才能变成想要的结果
代码如下:
private sub form_click( )
dim a(2,2)
for i = 1 to 2
for j = 1 to 2
if i = j then
a(i,j) = 1
else
a(i,j) = 0
end if
next j
next i
for each b in a
print b;
next b
end sub