program hotrotinhoc;
var s,st: string;
d: integer;
begin
write('Nhap xau : '); readln(s);
write('Nhap tu : '); readln(st);
d:=0;
while pos(st,s)<>0 do
begin
inc(d);
delete(s,pos(st,s),1);
end;
write(d);
readln
end.
uses crt;
var st:string;
d,i,dem:integer;
ktu:char;
begin
clrscr;
write('nhap xau:'); readln(st);
write('nhap tu can kiem tra:'); readln(ktu);
d:=length(st);
dem:=0;
for i:=1 to d do
if ktu=st[i] then inc(dem);
writeln(ktu,' xuat hien trong xau ',st,' ',dem,' lan');
readln;
end.