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