Perfect numbers: Difference between revisions

Content added Content deleted
Line 1,017: Line 1,017:


==={{header|Craft Basic}}===
==={{header|Craft Basic}}===
<syntaxhighlight lang="basic">print "calculating..."
<syntaxhighlight lang="basic">for n = 1 to 10000

for n = 1 to 10000


let s = 0
let s = 0
Line 1,035: Line 1,033:
if s = n then
if s = n then


print n, " is perfect."
print n, " ",


endif
endif
Line 1,042: Line 1,040:


next n</syntaxhighlight>
next n</syntaxhighlight>
{{out| Output}}<pre>6 28 496 8128 </pre>


==={{header|IS-BASIC}}===
==={{header|IS-BASIC}}===