uses crt;
var i,n,t,dem:integer;
begin
clrscr;
write('Nhap n='); readln(n);
t:=0;
dem:=0;
for i:=1 to n do
if i mod 2=0 then
begin
t:=t+i;
inc(dem);
end;
writeln('Trung binh cac so chan trong khoang tu 1 toi ',n,' la: ',t/dem:4:2);
readln;
end.