program ctdt;
uses crt;
var s1,s2:string;
dem,i,j:integer;
(*--------------------*)
BEGIN
clrscr;
write('nhap ptu1: ');readln(s1);
write('nhap ptu2: ');readln(s2);
{cach1:
dem:=0;
while i<=length(s1) do
begin
while j<=length(s2) do
if s1[i]=s2[j] then
begin
dem:=dem+1;
break;
end
else j:=j+1;
i:=i+1;
end;}
{cach 2}
dem:=0;
for i:=1 to length(s1) do
begin
for j:=1 to length(s2) do
if s1[i]=s2[j] then
begin
dem:=dem+1;
end;
end;
if dem=length(s1) then
write('hai ptu ,'s1,' , ',s2,' bao gom ki tu cua nhau')
else write('hai ptu ,'s1,' , ',s2,' khong bao gom ki tu cua nhau');
readln
end.