Example 2: GCDs (1)
The greatest common divisor (GCD) of two positive integers is the largest integer that exactly divides both. E.g., the GCD of 77 and 21 is 7.
To compute the GCD of positive integers m and n:
1. Set p to m, and set q to n.2. Until q exactly divides p, repeat: 2.1. Set p to q, and set q to (p modulo q).3. Terminate with answer q.
Could be performed by a human, perhaps equipped with an abacus or calculator.