DECLARE SUB INVERT (A%(), N%) DEFINT A-Z CLS N = 20 DIM A(N) PRINT "Массив до перестановки :" FOR I = 0 TO N - 1: A(I) = I + 1: PRINT A(I); : NEXT I PRINT INVERT A(), N PRINT "Массив после перестановки :" FOR I = 0 TO N - 1: PRINT A(I); : NEXT I END SUB INVERT (A%(), N%) DEFINT A-Z FOR I = 0 TO (N - 1) \ 2 TMP = A(I): A(I) = A(N - I - 1): A(N - I - 1) = TMP NEXT I END SUB