вид массива
0 0 1 1
0 0 2 2
3 3 0 0
4 4 0 0
полученный массив напечатать
CLS
DIM a(4, 4)
FOR i = 1 TO 4
FOR j = 1 TO 4
IF i < 3 AND j < 3 OR i > 2 AND j > 2 THEN a(i, j) = 0 ELSE a(i, j) = i
NEXT
NEXT
PRINT "ishodnyj massiv"
FOR i = 1 TO 4
FOR j = 1 TO 4
PRINT a(i, j);
NEXT
PRINT
NEXT
FOR j = 1 TO 4
FOR i = 1 TO 4
FOR k = 2 TO 4
IF a(k, j) > a(k - 1, j) THEN SWAP a(k, j), a(k - 1, j)
NEXT
NEXT
NEXT
PRINT "novyj massiv"
FOR i = 1 TO 4
FOR j = 1 TO 4
PRINT a(i, j);
NEXT
PRINT
NEXT
Тестирование выполнено в программе QB64 ( Скачать )