Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 543 Bytes

File metadata and controls

32 lines (19 loc) · 543 Bytes

Euclid method to find GCD

Question

Euclid's method to determine the greatest common divisor between two numbers.

Solution

.. literalinclude:: ../../languages/python/algorithm_euclid.py
   :language: python
   :tab-width: 4

.. runcode:: ../../languages/python/algorithm_euclid.py
   :language: python
   :codesite: ideone

Explanation

.. seealso::

   * :python-suggest-improve:`algorithm_euclid.py`
   * :python-better-explain:`algorithm_euclid.rst`