DIM a(5, 3), b(5)
RANDOMIZE TIMER
CLS
FOR i = 1 TO 5
FOR j = 1 TO 3
a(i, j) = INT(RND * 21)
NEXT
NEXT
PRINT "massiv"
FOR i = 1 TO 5
FOR j = 1 TO 3
PRINT a(i, j);
NEXT
PRINT
NEXT
FOR i = 1 TO 5
b(i) = a(i, 1)
FOR j = 2 TO 3
IF a(i, j) < b(i) THEN b(i) = a(i, j)
NEXT
PRINT "min ("; i; ")="; b(i)
NEXT
FOR i = 1 TO 5
FOR j = 2 TO 5
IF b(j) > b(j - 1) THEN SWAP b(j), b(j - 1)
NEXT
NEXT
FOR i = 1 TO 5
PRINT b(i);
NEXT
Тестирование выполнено в программе QB64 ( Скачать )