uses crt;
var a:array[1..100]of integer;
i,n,dem,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;
dem:=0;
for i:=1 to n do
if (50<=a[i]) and (a[i]<=150) then
begin
tb:=tb+a[i];
inc(dem);
end;
writeln('Ket qua la: ',tb/dem:4:2);
readln;
end.