WSQ12 – Greatest Common Divisor

this function is to find the GCD of two integers given by the user using the euclidean algorithm, divide the highest value by the lower one and then divide the lower value by the reminder until the reminder is 0 and the gcd is the last reminder before hiting 0.

euclid’s algorith reference:

https://www.youtube.com/watch?v=AJn843kplDw

my code:

 

CC BY 4.0 WSQ12 – Greatest Common Divisor by sergio is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.