begin comment zeef van Erathostenes;
integer p, m;
boolean array prime [2 : 10000];
for p:= 2, 3 step 2 until 10000 do
prime[p]:= true ;
for p:= 2, 3 step 2 until 10 do
begin if prime[p]
then for m:= p * p step p until 10000 do
prime[m]:= false
end;
m:= 0;
for p:= 2, 3 step 2 until 10000 do
begin if prime[p]
then begin m:= m + 1 end
end;
NLCR; PRINTTEXT(|<number of primes below 100 000: |>); ABSFIXT(5,0,m)
end