Program n1;
Uses CRT;
Const n=10;
Var A: array[1..n] of integer;
i,s,k: integer; sr: real;
begin
ClrScr;
randomize;
k:=0; s:=0;
For i:=1 to n do
begin
a[i]:=random(10);
If a[i]=i then
begin
s:=s+a[i];
k:=k+1;
end;
write(a[i]:3)
end;
writeln;
If k<>0 then
begin
sr:=s/k;
writeln('Srednee arifmeticheskoe =',sr);
end
else writeln('elementov net');
readln
end.