CLS
INPUT "vvedite razmer massiva"; n
DIM a(n)
FOR i = 1 TO n
PRINT "vvedit element"; i
INPUT q
a(i) = q
NEXT
CLS
PRINT "massiv"
FOR i = 1 TO n
PRINT a(i);
NEXT
FOR i = 1 TO n
IF a(i) = 0 THEN a(i) = 1
NEXT
PRINT
PRINT "new massiv"
FOR i = 1 TO n
PRINT a(i);
NEXT
Тестирование выполнено в программе QB64 ( Скачать )