CLS ' Ochistka ekrana
CONST m = 5 ' Kol-vo strok
DIM St(m) AS STRING, Filter AS STRING, NewSt AS STRING
Filter = ".,-:!?)(" ' Znaki prepinaniya kotorie trebuetsya ubrat
' Vvod dannikh
FOR i = 1 TO m
PRINT "Vvedite stroku" + STR$(i) + ": ";: COLOR 15: LINE INPUT St(i)
COLOR 7
NEXT
' Proverka kazhdoi stroki po bukvam
FOR Vne = 1 TO m
FOR Vnu = 1 TO LEN(St(Vne))
smb$ = MID$(St(Vne), Vnu, 1)
FOR i = 1 TO LEN(Filter): IF smb$ = MID$(Filter, i, 1) GOTO 50
NEXT
NewSt = NewSt + smb$
50 NEXT: St(Vne) = NewSt: NewSt = ""
NEXT: PRINT
' Rezultat zelyonim tsvetom
COLOR 10
FOR i = 1 TO m
PRINT STR$(i); ":"; St(i)
NEXT
Тестирование выполнено в программе QB64 ( Скачать )