CLS
INPUT "Введите слово ";slovo$
DATA "б","в","г","д","ж","з","р","k","л","м","н"
DATA "п","ф","к","т","ш","с","х","ц","ч"
DIM zv$(11)
FOR i=1 TO 11
READ zv$(i)
NEXT i
DIM gl$(9)
FOR i=1 TO 9
REAd gl$(i)
NEXT i
IF (LEFT$(slovo$, 3) = "без") OR (LEFT$(slovo$, 3) = "beс") THEN
FOR i = 1 TO 11
IF MID$(slovo$, 4, 1) = zv$(i) THEN
MID$(slovo$, 3, 1) = "з"
EXIT FOR
END IF
NEXT i
FOR i = 1 TO 9
IF MID$(slovo$, 4, 1) = gl$(i) THEN
MID$(slovo$, 3, 1) = "с"
EXIT FOR
END IF
NEXT i
PRINT "pravilno "; slovo$
ELSE PRINT "В веденном слове отсутствует приставка без или бес"
END IF
Тестирование выполнено в программе QB64 ( Скачать )