Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
27
Task/Additive-primes/EasyLang/additive-primes.easy
Normal file
27
Task/Additive-primes/EasyLang/additive-primes.easy
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
proc isprime x . r .
|
||||
r = 1
|
||||
for i = 2 to sqrt x
|
||||
if x mod i = 0
|
||||
r = 0
|
||||
break 2
|
||||
.
|
||||
.
|
||||
.
|
||||
proc digsum n . sum .
|
||||
sum = 0
|
||||
while n > 0
|
||||
sum += n mod 10
|
||||
n = n div 10
|
||||
.
|
||||
.
|
||||
for i = 2 to 500
|
||||
call isprime i r
|
||||
if r = 1
|
||||
call digsum i s
|
||||
call isprime s r
|
||||
if r = 1
|
||||
write i & " "
|
||||
.
|
||||
.
|
||||
.
|
||||
print ""
|
||||
Loading…
Add table
Add a link
Reference in a new issue