INPUT "vvedite N ", n
DIM a(n + 1)
RANDOMIZE TIMER
FOR i = 1 TO n
a(i) = INT(RND * 20) - 10
NEXT
PRINT "massiv"
FOR i = 1 TO n
PRINT a(i);
NEXT
PRINT
FOR i = 1 TO n
IF a(i) < a(i + 1) THEN PRINT a(i);: f = 1 ELSE IF f = 1 THEN PRINT a(i): f = 0 ELSE f = 0
NEXT
Тестирование выполнено в программе QB64 ( Скачать )