INPUT "vvedite razmer massiva ", n
DIM a(n)
RANDOMIZE TIMER
PRINT "ishodnyj massiv"
FOR i = 1 TO n
a(i) = INT(RND * 50)
PRINT a(i);
NEXT
nmax = 1
nmin = 1
FOR i = 1 TO n
IF a(i) < a(nmin) THEN nmin = i
NEXT
FOR i = nmin TO n - 1
a(i) = a(i + 1)
NEXT
FOR i = 1 TO n - 1
IF a(i) > a(nmax) THEN nmax = i
NEXT
FOR i = nmax TO n - 2
a(i) = a(i + 1)
NEXT
PRINT
PRINT "novyj massiv"
FOR i = 1 TO n - 2
PRINT a(i);
NEXT