Sieve of Eratosthenes: Difference between revisions

Content deleted Content added
Gil.B (talk | contribs)
Chkas (talk | contribs)
Line 5,707: Line 5,707:
=={{header|EasyLang}}==
=={{header|EasyLang}}==
<syntaxhighlight lang="text">
<syntaxhighlight lang="text">
len divisible[] 100
len is_divisible[] 100
max = sqrt len divisible[]
max = sqrt len is_divisible[]
for tst = 2 to max
for d = 2 to max
if divisible[tst] = 0
if is_divisible[d] = 0
i = tst * tst
for i = d * d step d to len is_divisible[]
is_divisible[i] = 1
while i <= len divisible[]
divisible[i] = 1
i += tst
.
.
.
.
.
.
for i = 2 to len divisible[]
for i = 2 to len is_divisible[]
if divisible[i] = 0
if is_divisible[i] = 0
print i
print i
.
.