CLS
DIM
A(100, 100)
INPUT
"N="; N
INPUT
"M="; M
FOR i
= 1 TO N
FOR j
= 1 TO M
PRINT
STR$(i);
PRINT
STR$(j);
INPUT ;
A(i, j)
NEXT j
PRINT
NEXT i
PRINT
"----------------------------------------------"
FOR i =
1 TO N
FOR j =
1 TO M
PRINT
A(i, j),
NEXT j
PRINT
NEXT i
PRINT
"----------------------------------------------"
FOR j =
M TO 1 STEP -1
FOR i = 1 TO N
PRINT A(i, j),
NEXT i
PRINT
NEXT j