(Numerical) a. Euclid\'s method for finding the greatest common divisor (GCD) of
ID: 3639727 • Letter: #
Question
(Numerical) a. Euclid's method for finding the greatest common divisor (GCD) of two positive integers consists of the following steps.Step 1, divide the larger number by the smaller and retain the reminder.
Step 2, Divide the smaller number by the reminder again retaining the reminder. Step 3, continue dividing the previous reminder by the current reminder until the reminder is 0, at which point the last none zero reminder is the GCD.
For example, if the two positive integers are 84 and 49 you have the following.
Step 1, 84/49 yields a reminder of 35.
Step 2, 49/35 yields the reminder of 14.
Step 3, 35/14 yields the reminder of 7.
Step 4, 14/7 yields the reminder of 0.
Therefore, the last none zero reminder which is 7 is the GCD of 84 and 49.
Explanation / Answer
PS: Please rate my answer #include int gcd(int n,int m) { if(mRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.