DIM a$(3, 3), max$(3), maxd(3)
FOR i = 1 TO 3
FOR j = 1 TO 3
INPUT "vvedite slovo ", a$(i, j)
NEXT
NEXT
PRINT "massiv"
FOR i = 1 TO 3
FOR j = 1 TO 3
PRINT a$(i, j); " ";
NEXT
PRINT
NEXT
min$ = a$(1, 1)
FOR j = 1 TO 3
max$(j) = a$(1, j)
maxd(j) = LEN(a$(1, j))
FOR i = 1 TO 3
IF LEN(a$(i, j)) > LEN(max$(j)) THEN max$(j) = a$(i, j): maxd(j) = LEN(max$(j))
IF LEN(a$(i, 1)) < LEN(min$) THEN min$ = a$(i, 1)
NEXT
PRINT "max(j)="; max$(j)
NEXT
FOR j = 1 TO 3
FOR i = 1 TO 3
IF LEN(a$(i, j)) = maxd(j) THEN a$(i, j) = min$
NEXT
NEXT
PRINT "novyj massiv"
FOR i = 1 TO 3
FOR j = 1 TO 3
PRINT a$(i, j); " ";
NEXT
PRINT
NEXT