Unformatted text preview: Here is the pseudo code for Euclidean Algorithm: 1. Initialize integer m and n 2. Do: m / n , and save remainder 3. Do: m = n, n = remainder 4. If n = 0, end and return m as the GCD 5. Else: repeat step 2 ~ 4 Once you calculated the GCD, divide the numerator and denominator of the original fraction by their GCD, and this will give you the lowest term of the fraction. Yi Wang, Radhika Medury...
View Full Document
- Fall '11
- Division, Greatest common divisor, Euclidean algorithm, Yi Wang, Radhika Medury