Дана матрица 6 на 6 и число K (от 1 до 6) столбец с максимальным по модулю элементом в K-ой строке переставить с K-ым столбцом — QBasic(Бейсик)

DIM A(1 TO 6, 1 TO 6) AS DOUBLE,B AS DOUBLE
DIM K AS INTEGER,I AS INTEGER,J AS INTEGER,L AS INTEGER
 
CLS
 
FOR I=1 TO 6
FOR J=1 TO 6
PRINT "BBEDITE A",I,J
INPUT A(I,J)
NEXT J
NEXT I
 
PRINT "BBEDITE K"
INPUT K
 
B=0
L=1
FOR I=1 TO 6
IF B<ABS(A(I,K)) THEN
B=ABS(A(I,K))
L=I
END IF
NEXT I
 
FOR J=1 TO 6
B=A(L,J)
A(L,J)=A(K,J)
A(K,J)=B
NEXT J
 
FOR I=1 TO 6
FOR J=1 TO 6
PRINT A(I,J)
NEXT J
NEXT I
 
END