Program HOC24;
var i,n: byte;
a: array[1..100] of integer;
tbc: real;
t: longint;
begin
write('Nhap N: '); readln(n);
for i:=1 to n do
begin
write('Nhap so thu ',i,': '); readln(a[i]);
tbc:=0; t:=0;
end;
for i:=1 to n do
begin
tbc:=tbc+a[i];
if a[i] mod 2=1 then t:=t+a[i];
end;
writeln('Trung binh cong cac phan tu la: ',btc/n:5:2);
write('Tong cac so le la :',t);
readln
end.
Đúng 0
Bình luận (0)