Q.

What is the GCD of a and b?

A. a + b
B. gcd (a-b, b) if a>b
C. gcd (a+b, a-b)
D. a – b
Answer» B. gcd (a-b, b) if a>b
Explanation: as per euclid’s algorithm, gcd (a, b) = gcd (a-b, b) if a > b or gcd (a, b) = gcd (a, b-a) if b > a.
1.7k
0
Do you find this helpful?
13

Discussion

No comments yet