Chapter 8: Problem 8
The greatest common divisor (GCD) of two values can be computed using Euclid's algorithm. Starting with the values \(m\) and \(n\), we repeatedly apply the formula: \(n, m=m,\) n\% until \(m\) is \(0 .\) At that point, \(n\) is the GCD of the original \(m\) and \(n .\) Write a program that finds the GCD of two numbers using this algorithm.
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.