CLS
INPUT "N"; n
DIM e(n)
FOR i = 1 TO n
INPUT e(i)
NEXT
CLS
min1 = e(1)
PRINT "massiv:"
FOR i = 1 TO n
PRINT e(i);
IF e(i) < min1 THEN min1 = e(i): min2 = i
NEXT
PRINT
PRINT "min :"; min1;
PRINT "ego p/n:"; min2
SWAP e(min2), e(n)
PRINT "noviy massiv:"
FOR i = 1 TO n
PRINT e(i);
NEXT