[]
Method that calculates the Greatest Common Divisor (GCD) of two positive integer numbers.
public static int gcd(int x1, int x2)
| Type | Name | Description |
|---|---|---|
| int | x1 | |
| int | x2 |
| Type | Description |
|---|---|
| int |
Method that calculates the Greatest Common Divisor (GCD) of several positive integer numbers.
public static int gcd(int[] x)
| Type | Name | Description |
|---|---|---|
| int[] | x | Array containing the numbers. |
| Type | Description |
|---|---|
| int |