How to find GCD of two numbers ?

[Question]: There is two number find the Greatest common divisor example 3,6 – GCD is 3Better Approach using Euclidean algorithm Here we used recursion which swap the params with second argument as modulo divisor. If we do dry run for above code snippet Case 1: For 3,11 a & b values in loop will be …

How to find GCD of two numbers ? Read More »