The extended Euclid’s algorithm determines not only the greatest common divisor d of two positive integers m and n but also integers (not necessarily positive) x and y, such that mx + ny = d.
a. Look up a description of the extended Euclid’s algorithm (see, e.g., [KnuI,p. 13]) and implement it in the language of your choice.
b. Modify your program to find integer solutions to the Diophantine equation ax + by = c with any set of integer coefficients a, b, and c.
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.