Удалить из текста все цифры — Pascal(Паскаль)

uses crt;

var
  dl, ch, n, i: integer;
  text, text1, c: string;

label 1;

begin
  clrscr;
  writeln('Введите текст');
  readln(text);
  dl := length(text);
  text1 := '0123456789';
  for i := 1 to 10 do
  begin
    c := copy(text1, i, 1);
    n := pos(c, text);
  1:
    if n > 0 then
    begin
      Delete(text, n, 1);
      insert(' ', text, n);
      dl := length(text);
      if dl > 0 then
      begin
        n := pos(c, text);
        goto 1;
      end;
    end;
  end;
  writeln(text);

end.

Leave a Comment

+ 29 = 34