INPUT (n)
DIM a, b(n)
FOR i = 1 TO n
INPUT a(i)
NEXT
FOR i = 1 TO n
IF a(i) >= 0 THEN k = k + 1: b(k) = a(i)
NEXT
FOR i = 1 TO k
PRINT b(i); " ";
NEXT
Тестирование выполнено в программе QB64 ( Скачать )
INPUT (n)
DIM a, b(n)
FOR i = 1 TO n
INPUT a(i)
NEXT
FOR i = 1 TO n
IF a(i) >= 0 THEN k = k + 1: b(k) = a(i)
NEXT
FOR i = 1 TO k
PRINT b(i); " ";
NEXT
Тестирование выполнено в программе QB64 ( Скачать )