INPUT "vvedite kol-vo elementov ", k
DIM c(k), e(k), b(k)
RANDOMIZE TIMER
PRINT "ishodnyj massiv"
FOR i = 1 TO k
c(i) = INT(RND * 10)
PRINT c(i);
NEXT
PRINT
FOR i = 1 TO k
IF c(i) MOD 2 <> 0 THEN m = m + 1: b(m) = c(i) ELSE IF c(i) <> 0 THEN n = n + 1: e(n) = c(i)
NEXT
PRINT "massiv chetnyh"
FOR i = 1 TO n
PRINT e(i);
NEXT
PRINT
PRINT "massiv nechetnyh"
FOR i = 1 TO m
PRINT b(i);
NEXT
Тестирование выполнено в программе QB64 ( Скачать )