/ Published in: C
Let m and n be variables containing the two numbers.
If n is 0, then stop : m contains the GCD
Otherwise, compute the remainder when m is divided by n.
Copy n into m and copy the remainder into n.
Then repeat the process, starting with testing whether n is 0.
If n is 0, then stop : m contains the GCD
Otherwise, compute the remainder when m is divided by n.
Copy n into m and copy the remainder into n.
Then repeat the process, starting with testing whether n is 0.