INPUT n
INPUT m
DIM a(n,m)
DIM b(n*m)
RANDOMIZE TIMER
FOR i = 1 TO n
FOR j = 1 TO m
a(i,j) = INT(RND(1)*10)-5
IF a(i,j)<0 THEN a(i,j)=a(i,j)^3
b(j+m*(i-1))=a(i,j)
NEXT
NEXT
INPUT n
INPUT m
DIM a(n,m)
DIM b(n*m)
RANDOMIZE TIMER
FOR i = 1 TO n
FOR j = 1 TO m
a(i,j) = INT(RND(1)*10)-5
IF a(i,j)<0 THEN a(i,j)=a(i,j)^3
b(j+m*(i-1))=a(i,j)
NEXT
NEXT