SHARE
TWEET

Untitled

a guest Oct 11th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var
  2.     s : string;
  3.     ch : char;
  4.     n, i, j : integer;
  5. begin
  6.     writeln('Введите текст:');
  7.     readln(s);
  8.     i := 2;
  9.     while i <= length(s) - 1 do
  10.     begin
  11.         if (s[i] = '-') and (s[i - 1] <> ' ') then
  12.             insert(' ', s, i);
  13.         if (s[i] = '-') and (s[i + 1] <> ' ') then
  14.             insert(' ', s, i + 1);
  15.         i := i + 1;
  16.     end;
  17.     writeln(s);
  18. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top