Question: In C language Just so i can copy and paste Implement the following algorithm as the find_gcd( ). This function will find the greatest common

In C language Just so i can copy and paste

Implement the following algorithm as the find_gcd( ). This function will find the greatest common divisor (that is, the product of all common factors) of integers n1 and n2 . Algorithm: Put the absolute value of n1 in q and of n2 in p . Store the remainder of q divided by p in r . while r is not zero Copy p into q and r into p . Store the remainder of q divided by p in r . p is the gcd .

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!