The greatest common divisor (gcd) of two or more integers, when at least one of them is not zero, is the largest positive integer that is a divisor of both numbers.
For example, the GCD of 8 and 12 is 4.
This is java program to find the gcd of given two numbers. GCD is calculated using Euclidean Algorithm.
SOURCE CODE ::
OUTPUT ::
need an explanation for this answer? contact us directly to get an explanation for this answer