uses crt;
var a:array[1..100]of integer;
n,i,max,min,tb:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
tb:=0;
for i:=1 to n do
tb:=tb+a[i];
writeln('Gia tri trung binh cua day so la: ',tb/n:4:2);
max:=a[1];
min:=a[1];
for i:=1 to n do
begin
if max<a[i] then max:=a[i];
if min>a[i] then min:=a[i];
end;
writeln('Gia tri lon nhat cua day so la: ',max);
writeln('Gia tri nho nhat cua day so la: ',min);
readln;
end.