CLS
RANDOMIZE TIMER
n = 3
DIM a(n, n)
FOR i = 1 TO n: FOR j = 1 TO n
a(i, j) = FIX(RND * 101 - 50)
NEXT: NEXT
FOR i = 1 TO n: FOR j = 1 TO n
PRINT a(i, j);
NEXT: PRINT: NEXT
PRINT STRING$(80, 196)
FOR i = 1 TO n: FOR j = 2 TO 3
IF a(i, j) < 0 THEN a(i, j) = a(i, j) - 4
NEXT: NEXT
FOR i = 1 TO n: FOR j = 1 TO n
PRINT a(i, j);
NEXT: PRINT: NEXT
Тестирование выполнено в программе QB64 ( Скачать )