DIM a(100), b(100)
RANDOMIZE TIMER
PRINT "ishodnyj massiv"
FOR i = 1 TO 100
a(i) = INT(RND * 100) - 50
PRINT a(i); " ";
NEXT
PRINT
min = a(1)
max = a(1)
INPUT "vvedite chislo n=", n
FOR i = 1 TO 100
IF a(i) > 0 THEN s = s + a(i)
IF a(i) < min THEN min = a(i)
IF a(i) > max THEN max = a(i)
IF a(i) > n THEN k = k + 1: b(k) = a(i)
NEXT
PRINT "summa polojitelnyh="; s
PRINT "max="; max
PRINT "min="; min
PRINT "novyj massiv"
FOR i = 1 TO k
PRINT b(i); " ";
NEXT
Тестирование выполнено в программе QB64 ( Скачать )