Program HOC24;
var tbc: real;
d,n,i: integer;
a: array[1..32000] of integer;
t: longint;
begin
write('Nhap so nguyen N : '); readln(n);
t:=0;
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
if a[i]>0 then
begin
d:=d+1;
t:=t+a[i];
end;
end;
tbc:=t/d;
write('Trung binh cong cac so duong la : ',tbc:1:2);
readln
end.
Đúng 0
Bình luận (0)