Var ar:array of integer; i,n:integer; IntSet:set of integer; begin; randomize; readln(n); setlength(ar,n+1); writeln('Array:'); for i:=1 to n do begin; ar[i]:=random(100); write(ar[i]:4); IntSet+=[ar[i] mod 10]; end; writeln; writeln('Set:',IntSet); end.
i,n:integer;
IntSet:set of integer;
begin;
randomize;
readln(n);
setlength(ar,n+1);
writeln('Array:');
for i:=1 to n do
begin;
ar[i]:=random(100);
write(ar[i]:4);
IntSet+=[ar[i] mod 10];
end;
writeln;
writeln('Set:',IntSet);
end.