Exercise · ZW-EUCLIDEAN-ALGORITHM-001 · ★☆☆ Basic

Compute \(\gcd(252,105)\) with the Euclidean algorithm.

Choose one option.

Show answer
  • C. 21

Explanation

\(252=2\cdot105+42\), \(105=2\cdot42+21\) and \(42=2\cdot21+0\); the last nonzero remainder is 21.

Study Discrete mathematics in ZWMath →

Review the concept: Euclidean algorithm

The Euclidean algorithm computes the greatest common divisor of two integers \(a\) and \(b\) by dividing repeatedly, replacing each pair by the divisor and the remainder, until the remainder is 0.

\[\gcd(a,b)=\gcd(b,\,a\bmod b)\]

More practice problems: euclidean algorithm

ZW-EUCLIDEAN-ALGORITHM-002 →