Data update
This commit is contained in:
parent
796d366b97
commit
35bcdeebf8
504 changed files with 7045 additions and 610 deletions
25
Task/Ascending-primes/EasyLang/ascending-primes.easy
Normal file
25
Task/Ascending-primes/EasyLang/ascending-primes.easy
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
func isprim num .
|
||||
if num < 2
|
||||
return 0
|
||||
.
|
||||
i = 2
|
||||
while i <= sqrt num
|
||||
if num mod i = 0
|
||||
return 0
|
||||
.
|
||||
i += 1
|
||||
.
|
||||
return 1
|
||||
.
|
||||
proc nextasc n . .
|
||||
if isprim n = 1
|
||||
write n & " "
|
||||
.
|
||||
if n > 123456789
|
||||
return
|
||||
.
|
||||
for d = n mod 10 + 1 to 9
|
||||
nextasc n * 10 + d
|
||||
.
|
||||
.
|
||||
nextasc 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue