Uses crt;
Var m:array[1..1000] of integer;
I,sr,n:integer;
Begin
Clrscr;
Writeln('Введите размер массива');
Readln(n);
For i:=1 to n do
Begin
m[i]:=random(30)+1;
Write(m[i],' ');
Sr:=sr+m[i];
End;
Writeln;
Writeln(' Сред. Арф. = ',sr div n);
Readkey;
End.