Why
Program zadanie; uses crt; var t : array[1..100] of string; i,j,n:byte; s,temp:string; begin clrscr; n:=0; Writeln('Wpisz tekst:'); readln(s); s:=s+' '; while pos(' ',s) > 0 do if copy(s,pos(' ',s),1) = ' ' then begin n:=n+1; t[n]:=copy(s,1,pos(' ',s)-1); s:=copy(s,pos(' ',s)+1,length(s)); end; for i:=1 to n do begin temp:=t[i]; t[i]:=''; for j:=length(temp) downto 1 do t[i]:=t[i]+temp[j]; write(t[i],' '); end; readkey; end.
uses crt;
var
t : array[1..100] of string;
i,j,n:byte;
s,temp:string;
begin
clrscr;
n:=0;
Writeln('Wpisz tekst:');
readln(s);
s:=s+' ';
while pos(' ',s) > 0 do
if copy(s,pos(' ',s),1) = ' ' then
begin
n:=n+1;
t[n]:=copy(s,1,pos(' ',s)-1);
s:=copy(s,pos(' ',s)+1,length(s));
end;
for i:=1 to n do
begin
temp:=t[i];
t[i]:='';
for j:=length(temp) downto 1 do
t[i]:=t[i]+temp[j];
write(t[i],' ');
end;
readkey;
end.
W razie problemów pisz pw.