Data update
This commit is contained in:
parent
5af6d93694
commit
796d366b97
455 changed files with 7413 additions and 1900 deletions
25
Task/Farey-sequence/EasyLang/farey-sequence.easy
Normal file
25
Task/Farey-sequence/EasyLang/farey-sequence.easy
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
proc farey n . .
|
||||
b = 1 ; c = 1 ; d = n
|
||||
write n & ": "
|
||||
repeat
|
||||
if n <= 11
|
||||
write " " & a & "/" & b
|
||||
.
|
||||
until c > n
|
||||
k = (n + b) div d
|
||||
aa = c ; bb = d ; cc = k * c - a ; dd = k * d - b
|
||||
a = aa ; b = bb ; c = cc ; d = dd
|
||||
items += 1
|
||||
.
|
||||
if n > 11
|
||||
print items & " items"
|
||||
else
|
||||
print ""
|
||||
.
|
||||
.
|
||||
for i = 1 to 11
|
||||
farey i
|
||||
.
|
||||
for i = 100 step 100 to 1000
|
||||
farey i
|
||||
.
|
||||
Loading…
Add table
Add a link
Reference in a new issue