var a, b, c: string; d: array of char := (' ', ',', '.', '-', '!', '?'); e: array of char;
begin readln(a); foreach b in a.Split(d, System.StringSplitOptions.RemoveEmptyEntries) do begin e := b.ToCharArray(); System.Array.Reverse(e); write(String.Create(e), ' '); end; end.
Var i,j,n:integer; s,a,t:string; begin write('Введи текст: '); readln(s); n:=length(s); for i:=1 to n do begin a:=a+s[i]; if (s[i]=' ') or (i=n) then begin if i=n then a:=a+' '; for j:= length(a) downto 1 do t:=t+a[j]; a:=''; end end; writeln(t) end.
a, b, c: string;
d: array of char := (' ', ',', '.', '-', '!', '?');
e: array of char;
begin
readln(a);
foreach b in a.Split(d, System.StringSplitOptions.RemoveEmptyEntries) do
begin
e := b.ToCharArray();
System.Array.Reverse(e);
write(String.Create(e), ' ');
end;
end.
i,j,n:integer;
s,a,t:string;
begin
write('Введи текст: ');
readln(s);
n:=length(s);
for i:=1 to n do
begin
a:=a+s[i];
if (s[i]=' ') or (i=n) then
begin
if i=n then a:=a+' ';
for j:= length(a) downto 1 do t:=t+a[j];
a:='';
end
end;
writeln(t)
end.