DIM a$(3, 3)
FOR i = 1 TO 3
FOR j = 1 TO 3
INPUT "vvedite slovo ", a$(i, j)
NEXT
NEXT
PRINT "ishodnyj massiv"
FOR i = 1 TO 3
FOR j = 1 TO 3
PRINT a$(i, j); " ";
NEXT
PRINT
NEXT
INPUT "vvedite slovo dlya zameny ", b$
FOR i = 1 TO 3
FOR j = 1 TO 3
IF MID$(a$(i, j), LEN(a$(i, j)), 1) = "я" THEN a$(i, j) = b$
NEXT
NEXT
PRINT "novyj massiv"
FOR i = 1 TO 3
FOR j = 1 TO 3
PRINT a$(i, j); " ";
NEXT
PRINT
NEXT
Тестирование выполнено в программе QB64 ( Скачать )