Bài 1:
uses crt;
var st:string;
d,i:integer;
begin
clrscr;
write('Nhap xau:'); readln(st);
d:=length(st);
writeln('Cac ki tu thuong trong xau ',st,' la: ');
for i:=1 to d do
if st[i] in['a'..'z'] then write(st[i]:4);
readln;
end.
Bài 2:
uses crt;
var st:string;
d,i,kt:integer;
begin
clrscr;
write('Nhap xau:'); readln(st);
d:=length(st);
kt:=0;
for i:=1 to d do
if st[i]<>st[d-i+1] then kt:=1;
if kt=0 then writeln('Xau doi xung')
else writeln('Xau khong doi xung');
readln;
end.