[原创]数组行和列元素对换
将一个二维数组行和列元素对换,存到另一个二维数组中.以下是我自己写的哈。
clea
dime a(3,2)
dime b(2,3)
for i=1 to 3
for j=1 to 2
input "a("+str(i,1)+","+str(j,1)+")=" to a(i,j)
next
next
for i=1 to 3
for j=1 to 2
?? "a("+str(i,1)+","+str(j,1)+")="+str(a(i,j),3)+space(5)
next
?
next
for i=1 to 2
for j=1 to 3
b(i,j)=a(j,i)
next
next
?
for i=1 to 2
for j=1 to 3
?? "b("+str(i,1)+","+str(j,1)+")="+str(b(i,j),3)+space(5)
next
?
next
retu