Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
|
|
@ -0,0 +1,15 @@
|
|||
100 cls
|
||||
110 a = 40902
|
||||
120 b = 24140
|
||||
130 print : print "GCD(";a;", ";b;") = ";gcdi(a,b)
|
||||
140 print : print "GCD(";a;", 111) = ";gcdi(a,111)
|
||||
170 end
|
||||
|
||||
190 sub gcdi(x,y)
|
||||
200 while y
|
||||
210 t = y
|
||||
220 y = x mod y
|
||||
230 x = t
|
||||
240 wend
|
||||
250 gcdi = x
|
||||
260 end sub
|
||||
|
|
@ -1,3 +1 @@
|
|||
[dup [dup rot % loop] swap do?] \loop def
|
||||
|
||||
[loop drop] \gcd def
|
||||
[[a b]: a [b a b % gcd] b do?] \gcd def
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue