uses crt;
var a:array[1..100]of integer;
i,n,t,dem,kt,j:integer;
tbc:real;
begin
clrscr;
write('n='); readln(n);
if (1<=n) and (n<=100) then
begin
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
{----------------------cau-a----------------------}
dem:=0;
t:=0;
for i:=1 to n do
if a[i]>0 then
begin
inc(dem);
t:=t+a[i];
end;
tbc:=t/dem;
writeln('trung binh cong cua cac phan tu lon hon 0 trong day so la: ',tbc:4:2);
{---------------------cau-b-----------------------}
writeln('cac so nguyen to co trong day la: ');
for i:=1 to n do
if a[i]>1 then
begin
kt:=0;
for j:=2 to a[i]-1 do
if a[i] mod j=0 then kt:=1;
if kt=0 then write(a[i]:4);
end;
end
else writeln('vui long nhap lai so n');
readln;
end.