{ const size := 1000; const IsPrime := @boolean {size of true}; var j := 0; var count := 0; for j := 0 to size - 1 do if IsPrime[j] then { const prime := j + j + 3; func mark (x:integer) { if x < size then { IsPrime[x] := false; x := x + prime; mark(x) } }; const k := j + prime; mark(k); count := count + 1 }; write("The number of prime numbers less than ", size, " is ", count) }