INPUT "vvedite kol-vo elementov ", n
DIM a(n), b(n)
RANDOMIZE TIMER
PRINT "ishodnyj massiv"
FOR i = 1 TO n
a(i) = INT(RND * 20) - 10
PRINT a(i); " ";
NEXT
PRINT
INPUT " vvedite chislo P ", p
min = a(1)
nommin = 1
FOR i = 1 TO n
IF a(i) < 0 THEN kolotr = kolotr + 1
IF a(i) < min THEN min = a(i): nommin = i
IF a(i) > p THEN k = k + 1: b(k) = a(i)
NEXT
PRINT "kolichestvo otricat="; kolotr
PRINT "min element="; min
PRINT "nomer min elementa="; nommin
PRINT "novyj massiv"
FOR i = 1 TO k
PRINT b(i); " ";
NEXT