uses crt;
var s:string;
i,j,dem:integer;
t:boolean;
begin
clrscr;
write('Nhap xau:');readln(s);
dem:=0; for i:=1 to length(s) do
begin
t:=false;
for j:=1 to i-1 do
if((s[j])=(s[i])) then t:=true;
if not(t) then inc(dem);
end;
write('Co ',dem,' ki tu khac nhau.');
readln;
end.
Đúng 1
Bình luận (0)