Chowla numbers: Difference between revisions

(→‎{{header|Vlang}}: Rename "Vlang" in "V (Vlang)")
Line 1,386:
=={{header|EasyLang}}==
{{trans|Go}}
<syntaxhighlight lang="text">func chowla n . sum .
func chowla n . sum .
sum = 0
i = 2
Line 1,403 ⟶ 1,404:
func sieve . c[] .
i = 3
while i * 3 <= len c[]
if c[i] = 0
call chowla i h
if h = 0
j = 3 * i
while j <= len c[]
c[j] = 1
j += 2 * i
Line 1,421 ⟶ 1,422:
s$ = ""
l = len s$[]
for i range= 1 to len s$[]
if i > 01 and l mod 3 = 0
s$ &= ","
.
Line 1,441 ⟶ 1,442:
power = 100
i = 3
while i <= len c[]
if c[i] = 0
count += 1
Line 1,475 ⟶ 1,476:
print "There are " & count & " perfect mumbers up to " & s$
.
call main</syntaxhighlight>
</syntaxhighlight>
{{out}}
<pre>
Line 1,531 ⟶ 1,533:
There are 5 perfect mumbers up to 35,000,000
</pre>
 
=={{header|Factor}}==
<syntaxhighlight lang="factor">USING: formatting fry grouping.extras io kernel math
2,046

edits