INPUT "vvedite kol-vo strok ", n
INPUT "vvedite kol-vo stolbcov ", m
RANDOMIZE TIMER
PRINT "ishodnaya matrica"
FOR i = 1 TO n
FOR j = 1 TO m
r(i, j) = INT(RND * 20)
PRINT r(i, j);
NEXT
PRINT
NEXT
FOR j = 1 TO m
SWAP r(1, j), r(n, j)
NEXT
minx = 1
miny = 1
FOR i = 1 TO n
FOR j = 1 TO m
IF r(i, j) < r(minx, miny) THEN minx = i: miny = j
NEXT
NEXT
PRINT "novaya matrica"
FOR i = 1 TO n
FOR j = 1 TO m
PRINT r(i, j);
NEXT
PRINT
NEXT
PRINT "indeksy min elementa: stroka"; minx; " stolbec"; miny
Тестирование выполнено в программе QB64 ( Скачать )