GCD.q | R Documentation |
Finds the greatest common divisor (GCD) of two integers using the Euclidean algorithm. In addition to the value of GCD, it generates the number of required iterations to find GCD and the sequence of partial quotients.
GCD.q(x, y)
x |
the first integer greater than zero. |
y |
the second integer greater than zero. |
k |
the number of required iterations to find GCD. |
q |
the sequence of partial quotients. |
g |
the value of greatest common divisor. |
Haydar Demirhan
Maintainer: Haydar Demirhan <haydarde@hacettepe.edu.tr>
result=GCD.q(4535,2451) print(result) result=GCD.q(35,2) print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.