uses crt;
var a:array[1..100]of real;
i,n:integer;
tbc,t:real;
begin
clrscr;
write('n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
{---------------------------xu-ly---------------------------}
t:=0;
for i:=1 to n do
t:=t+a[i];
tbc:=t/n;
writeln('trung binh cong cua ',n,' so thuc ban vua nhap la: ',tbc:4:2);
readln;
end.
Program Sara_TRang;
Uses crt;
Var n,s,i:integer;
M:array[1..100] of integer;
Begin
Clrscr;
Write('Nhap so phan tu n:'); Readln(n);
s:=0;
For i:=1 to n do
Begin
Write('M[',i,']='); Readln(M[i]);
S:=s+M[i];
End;
Writeln('Trung binh cong cua cac so la:', s/n:4:3);
Readln
End.
var n,i:longint;a:array[0..100000] of real;
begin
readln(n);
for i:=1 to n do
begin
read(a[i]);
a[0]:=a[0]+a[i];
end;
writeln(a[0]/n:0:3);
end.