program Tong_phan_so;
varn, i, x : Integer;
tong, tong_phan_so, tong_phan_so_chan, tong_phan_so_le : Real;
begin
Write('Nhap n so: '); Readln(n);
tong := 0;
tong_phan_so := 0;
tong_phan_so_chan := 0;
tong_phan_so_le := 0;
for i := 1 to n do
begin
Write('Nhap so thu ', i, ': '); Readln(x);
tong := tong + x;
tong_phan_so := tong_phan_so + x/100;
if x mod 2 = 0 then
tong_phan_so_chan := tong_phan_so_chan + x/100
else
tong_phan_so_le := tong_phan_so_le + x/100;
end;
Writeln('Tong cua ', n, ' so la: ', tong:0:0);
Writeln('Tong phan so cua ', n, ' so la: ', tong_phan_so:0:2);
Writeln('Tong phan so chan cua ', n, ' so la: ',tong_phan_so_chan:0:2);
Writeln('Tong phan so le cua ', n, ' so la: ', tong_phan_so_le:0:2);
Writeln('Gia tri trung binh cua ', n, ' so la: ',tong_phan_so/n:0:2);
end.