Question: Using Euclids algorithm, find the greatest common factor between two numeric control inputs. Display a warning to the user if no common factor exists other
Using Euclids algorithm, find the greatest common factor between two numeric control inputs. Display a warning to the user if no common factor exists other than 1. As an example of Euclids algorithm in action, find the greatest common factor of 48 and 15. First divide 48 by 15 (the greater divided by the lesser) yielding 3 with a remainder of 3. Then divide 15 by 3 (the previous remainder) yielding 5 with no remainder. The last non-zero remainder is the greatest common factor. Therefore the greatest common factor of 48 and 15 is 3.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
