tk
uses crt;
var m,n,t,i:integer;
begin
clrscr;
write('Nhap m='); readln(m);
write('Nhap n='); readln(n);
t:=0;
for i:=m to n do
if i mod 2=0 then t:=t+i;
writeln('Tong cac so chan tu ',m,' den ',n,' la: ',t);
readln;
end.
uses crt;
var n,i,t,dem:integer;
begin
clrscr;
readln(n);
if n mod 2=0 then
begin
t:=0;
for i:=1 to n do
if i mod 2=0 then t:=t+i;
writeln(t);
end
else
begin
t:=0;
dem:=0;
for i:=1 to n do
if i mod 2=1 then
begin
t:=t+i;
dem:=dem+1;
end;
writeln(t/dem:4:2);
end;
readln;
end.