DIM c(5, 5), z(5, 5)
RANDOMIZE TIMER
PRINT "ishodnyj massiv"
FOR i = 1 TO 5
FOR j = 1 TO 5
c(i, j) = INT(RND * 20) - 10
PRINT c(i, j);
NEXT
PRINT
NEXT
PRINT "novyj massiv"
FOR i = 1 TO 5
FOR j = 1 TO 5
IF c(i, j) > 0 THEN z(i, j) = c(i, j) ELSE z(i, j) = 0
PRINT z(i, j);
NEXT
PRINT
NEXT
Тестирование выполнено в программе QB64 ( Скачать )