Need Help with GCD Program

Write a program (with well written comments and explanations) to implement the extended Euclidean algorithm on page 70 (also lecture slides). The program prompts the user for 2 integers: p & q. The program calculates the Bezout coefficients of gcd(p,q)
What have you tried so far? Do you understand how to use the extended Euclidean algorithm on paper? If not, I can give an example...
Last edited on
c++ already contains the gcd algorithm, you can just call it (does the extended one use the normal one and add to it or is it different, I don't recall).

% is modulus in c++, and I think you don't need anything exotic to write this.
Last edited on
Topic archived. No new replies allowed.