CONST w = "программа"
' 123456789
CLS
PRINT MID$(w, 3, 1) + LEFT$(w, 1) + RIGHT$(w, 1)
PRINT LEFT$(w, 1) + RIGHT$(w, 1) + MID$(w, 2, 1) + MID$(w, 6, 1)
PRINT MID$(w, 4, 5)
PRINT RIGHT$(w, 2) + MID$(w, 4, 1)
PRINT LEFT$(w, 1) + MID$(w, 3, 1) + MID$(w, 2, 3)
PRINT MID$(w, 4, 1) + RIGHT$(w, 4)
PRINT MID$(w, 5, 3) + RIGHT$(w, 1)
PRINT MID$(w, 4, 1) + MID$(w, 3, 1) + MID$(w, 5, 2)
PRINT MID$(w, 2, 3) + RIGHT$(w, 1)
PRINT RIGHT$(w, 2) + RIGHT$(w, 2)
Результат выполнения программы
опа
пара
грамм
маг
порог
гамма
рама
гора
рога
мама