Contains functions that help the user find the greatest common divisor [GCD] of two integers.
This is done using a very specific implementation of the Euclidean Algorithm — which is an extremely efficient way of calculating the GCD without having to use complex computations nor prime factorization. The calculations used in this Java program are ultimately very straight-forward, but contains well-formatted, human-readable code featuring glanceable in-line comments and a flawless programming style.
- Takes two arguments: int
a, intb - Returns the greatest common divisor of the two integers passed into this method.
- Takes two arguments: int
A, intB - Returns an array containing the information needed to calculate the GCD of two integers.
E.J. Yu