Сделать из программы процедуру pascal program kokokoko; uses crt; var fr,frn,s1: string; i: integer; begin clrscr; writeln('vvedite frazu: '); readln(fr); fr: =fr+' '; while pos(' ',fr)> 0 do begin s1: =copy(fr,1,pos(' ',fr)-1); delete(fr,1,pos(' ',fr)); begin frn: ='-'; for i: =length(s1) downto 1 do frn: =frn+s1[i]; write(frn); end; end; readkey; end.
procedure StrSeq(var fr,frn,s1:string);
var i:integer;
begin;
fr:=fr+' ';
While Pos(' ',fr)>0 do
Begin
s1:=Copy(fr,1,Pos(' ',fr)-1);
Delete(fr,1,Pos(' ',fr));
Begin
frn:='-';
for i:=length(s1) downto 1 do
frn:=frn+s1[i];
write(frn);
End;
End;
end;
begin
writeln('Vvedite frazu:');
readln(fr);
StrSeq(fr,frn,s1);
end.