Программа в qBasic:
DIM n AS INTEGER, i AS INTEGER, j AS INTEGER
RANDOMIZE TIMER
n = INT(RND * 91) + 10
DIM a(1 TO n) AS INTEGER, b(1 TO n) AS INTEGER
PRINT "Дан одномерный массив:"
j = 0
FOR i = 1 TO n
a(i) = INT(RND * 199) - 99
PRINT USING "####"; a(i);
IF a(i) MOD 2 = 0 THEN
j = j + 1
b(j) = a(i)
END IF
NEXT
PRINT
IF j = 0 THEN
PRINT "Все числа нечётныe"
ELSE
PRINT "Cформированный массив:"
FOR i = 1 TO j
PRINT USING "####"; b(i);
NEXT
END IF
END