Vara: array [1..10] of integer; b:string; c,i:integer; begin Randomize; for i:=1 to 10 do begin a[i]:=Random(5); write(a[i]); end; b:=''; c:=0; for i:=1 to 10 do if (pos(inttostr(a[i]),b) =0) then begin b:=b+inttostr(a[i]); inc(c); end; writeln(c); end. //ABC Pascal
b:string;
c,i:integer;
begin
Randomize;
for i:=1 to 10 do begin
a[i]:=Random(5);
write(a[i]);
end;
b:='';
c:=0;
for i:=1 to 10 do
if (pos(inttostr(a[i]),b) =0) then begin b:=b+inttostr(a[i]); inc(c); end;
writeln(c);
end.
//ABC Pascal