For each pair of integers a; b in the previous problem, find integers x and y such that ax + by D gcd (a;b)
1. Write a computer program that calculates the greatest common divisor of two integers using Euclid’s Algorithm. Have your program keep track of the number of times it is called to perform the calculation (that is, how “deep” it invokes recursion). For example, our illustration of Euclid’s algorithm to find gcd.63; 75/ took four steps. Use your program to check your answers to Exercise 36.1 and report the number of steps each calculation takes.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here