Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
23
Task/Perfect-numbers/Craft-Basic/perfect-numbers.basic
Normal file
23
Task/Perfect-numbers/Craft-Basic/perfect-numbers.basic
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
for n = 1 to 10000
|
||||
|
||||
let s = 0
|
||||
|
||||
for i = 1 to n / 2
|
||||
|
||||
if n % i = 0 then
|
||||
|
||||
let s = s + i
|
||||
|
||||
endif
|
||||
|
||||
next i
|
||||
|
||||
if s = n then
|
||||
|
||||
print n, " ",
|
||||
|
||||
endif
|
||||
|
||||
wait
|
||||
|
||||
next n
|
||||
Loading…
Add table
Add a link
Reference in a new issue