Jump to content

Sieve of Eratosthenes: Difference between revisions

m
(Added Euler)
Line 5,757:
max = sqrt len is_divisible[]
for d = 2 to max
if is_divisible[d] = 0
for i = d * d step d to len is_divisible[]
is_divisible[i] = 1
.
.
.
for i = 2 to len is_divisible[]
if is_divisible[i] = 0
print i
.
.</syntaxhighlight>
.
</syntaxhighlight>
 
=={{header|eC}}==
2,097

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.