INPUT n
DIM a(n, n)
FOR i = 1 TO n
FOR j = 1 TO n
PRINT "element"; i; " "; j
INPUT a(i, j)
NEXT
NEXT
min = a(1, 1): imin = 1: jmin = 1
FOR i = 1 TO n
FOR j = 1 TO n
IF a(i, j) < min THEN min = a(i, j): imin = i: jmin = j
NEXT j
NEXT i
a(imin, jmin) = -a(imin, jmin)
FOR i = 1 TO n
FOR j = 1 TO n
PRINT "element"; i; " "; j; "znachenie "; a(i, j)
NEXT
NEXT
Тестирование выполнено в программе QB64 ( Скачать )