I recommend passing the numbers as an array of int
and then applying the gcd algorithm on it recursively (preferably).
int gcd(int *array, int n)
{
if(n == 0)
{
//find gcd using while loop of array[n] and array[n + 1]. store in result.
return result;
}
return gcd(int *a, n -1);
}