Close

Greatest Common Divisor(GCD)

Returns the Greatest Common Divisor(GCD) or Highest Common Factor(HCF) of a set of numbers of arbitrary precision.

API

Endpoint
https://pebbles.cc/api/gcd
Parameters

Send a request with the following parameters:

apikey - Your API key

numbers - The numbers, seperated by commas

Response

The API returns a JSON object containing the fields status and output.

When the operation is successful, status has a value of "success", and output holds the result of the operation.

When there is an error in the operation, status has a value of "error", and output holds the error message(s). Multiple error messages are seperated with a "|".

Examples

{ "status" : "success", "output" : "2" }

{ "status" : "error", "output" : "Invalid input | API key not stated" }