Odwracanie zdania
Użytkownik podaje zdanie, program natomiast je odwraca i zlicza ilośc znaków.
Kompilator: Turbo Pascal
program teksta;
uses crt;
var tekst:string;
a,b,c,i:integer;
begin
clrscr;
writeln('Podaj tekst');
readln(tekst);
a:=length(tekst);
writeln('długosc wynosi ',a);
b:=length(tekst[c]);
for i:=a downto 1 do
begin
write('',tekst[i]);
end;
for i:=0 to length(tekst[i]) do
begin
write (tekst[i],' ');
end;
readln;
end.