INPUT "vvedite kolichestvo elementov N ", n
DIM a(n), b(n)
FOR i = 1 TO n
INPUT "vvedite element ", a(i)
NEXT
PRINT "massiv"
FOR i = 1 TO n
PRINT a(i);
NEXT
PRINT
FOR i = 1 TO n
IF a(i) < 0 THEN k = k + 1: b(k) = a(i) ^ 3
NEXT
PRINT "novyj massiv"
FOR i = 1 TO k
PRINT b(k);
NEXT
Тестирование выполнено в программе QB64 ( Скачать )