Greatest_commmon_divisor
- 27 May 2022
- 1 Minute to read
- DarkLight
- PDF
Greatest_commmon_divisor
- Updated on 27 May 2022
- 1 Minute to read
- DarkLight
- PDF
Article Summary
Given a list of numbers, calculates the greatest common divisor for them.
Function signature
GREATEST_COMMON_DIVISOR(list: Array) => Number
Parameter | Description |
---|---|
List | List of numeric values |
Examples
Formula | Return value |
---|---|
GREATEST_COMMON_DIVISOR([10, 100, 1000]) | 10 |
GREATEST_COMMON_DIVISOR([14, 21, 42]) | 7 |
GREATEST_COMMON_DIVISOR([12, 9, 15]) | 3 |
Was this article helpful?