Greatest common divisor

How do I get the greatest common divisor of two numbers in C++?
Please give me an explanation.

Thanks in advance
Last edited on
There are several algorithms described here.
https://en.wikipedia.org/wiki/Greatest_common_divisor
Topic archived. No new replies allowed.