Given two positive integers a and b, the GCD is the largest
number that divides both evenly. (For simplicity, we'll assume
.)
Examples:
- GCD(84, 42) = 42 [a divides b]
- GCD(63, 42) = 21
- GCD(91, 46) = 1 [relatively prime!]
- GCD(43, 1) = 1
- GCD(47, 0) = 47
Your turn: compute GCD(85,68)?
Next: Modulus
Up: GREATEST COMMON DIVISOR
Previous: GREATEST COMMON DIVISOR