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