Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
11
Task/Perfect-numbers/Ring/perfect-numbers.ring
Normal file
11
Task/Perfect-numbers/Ring/perfect-numbers.ring
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
for i = 1 to 10000
|
||||
if perfect(i) see i + nl ok
|
||||
next
|
||||
|
||||
func perfect n
|
||||
sum = 0
|
||||
for i = 1 to n - 1
|
||||
if n % i = 0 sum = sum + i ok
|
||||
next
|
||||
if sum = n return 1 else return 0 ok
|
||||
return sum
|
||||
Loading…
Add table
Add a link
Reference in a new issue