You can return one value from the gcd function. Any other number you want changed in the gcd function, with lasting effect, will have to be a number brought into the gcd function via it's address. The & in front of the variable name, means "the address of"the variable:
my_variable = a value
&my_variable = an address
Code:
my_gcd_function(number1, number2, &myNumerator, &myDenominator);
Would call a function, and pass two numbers (1 and 2) that could be changed, but the change will not have any effect after the function ends, and two addresses to numbers that, once changed in the function, will remain changed when the function ends.
Making your gcd function first line, (definition), to look like:
Code:
void my_gcd_function(int number1, int number2, *myNumerator, *myDenominator) {
//add your gcd code here
}
And Welcome to the forum, Kerniga!
If you could post your code, with some example numbers, we can be much more specific.