var i,n,tong:integer;
tbc:real;
begin
write('nhap n='); readln(n);
tong:=0; i:=1;
while i<=n do
begin
tong:=tong+i;
i:=i+1;
end;
tbc:=tong/n;
writeln('trung binh cong la:',tbc);
readln
end.
var i,n,tong:integer;
tbc:real;
begin
write('nhap n='); readln(n);
tong:=0; i:=1;
repeat
tong:=tong+i;
i:=i+1;
until i>n;
tbc:=tong/n;
writeln('trung binh cong la:',tbc);
readln
end.