Greatest common divisor: Difference between revisions
Content added Content deleted
m (→{{header|Clojure}}: gcd of list of numbers) |
(Applesoft BASIC) |
||
Line 216: | Line 216: | ||
== {{header|Applesoft BASIC}} == |
|||
<lang ApplesoftBasic>0 A = ABS(INT(A)) |
|||
1 B = ABS(INT(B)) |
|||
2 GCD = A * NOT NOT B |
|||
3 FOR B = B + A * NOT B TO 0 STEP 0 |
|||
4 A = GCD |
|||
5 GCD = B |
|||
6 B = A - INT (A / GCD) * GCD |
|||
7 NEXT B</lang> |
|||
== {{header|Arendelle}} == |
== {{header|Arendelle}} == |
||
<pre>< a , b > |
<pre>< a , b > |