Răspuns :
var a:array of integer;
i,b:byte;
n,c:integer;
begin
write('Marimea sirului: ');
read(n);
setlength(a,n);
writeln;
writeln('Sirul:');
for i:=0 to n-1 do read(a[i]);
writeln;
for c:=0 to 9999 do begin
b:=0;
for i:=0 to n-1 do if c=a[i] then inc(b);
if b<>0 then if b>1 then writeln('Numarul ',c,' scris de ',b,' ori') else
writeln('Numarul ',c,' scris o data');
end;
end.
i,b:byte;
n,c:integer;
begin
write('Marimea sirului: ');
read(n);
setlength(a,n);
writeln;
writeln('Sirul:');
for i:=0 to n-1 do read(a[i]);
writeln;
for c:=0 to 9999 do begin
b:=0;
for i:=0 to n-1 do if c=a[i] then inc(b);
if b<>0 then if b>1 then writeln('Numarul ',c,' scris de ',b,' ori') else
writeln('Numarul ',c,' scris o data');
end;
end.