GCD For all of You!

This is a discussion on GCD For all of You! within the C Programming forums, part of the General Programming Boards category; /* This programs makes use of recursion to calculate the GCD of N integers
By no means is intended to ...

GCD For all of You!

/* This programs makes use of recursion to calculate the GCD of N integers
By no means is intended to be a perfect program, there might be many other
ways (perhaps better) to do it, yet, I decided to post to help those who
are initiating in recursion and perhaps find it useful.
Author: Nicolas Raitman
Email: elrancha@hotmail.com
*/

/* first: we calculate the GCD between the first and next one
second: we calculate the GCD between the GCD of the first and the
second and the third, and so on...
Finally, we calculate the GCD of the GCD of all previous numbers
and the final number.
Confused? Try running the program a couple of times and then try to
trace the program and you will see how it works.
*/

void showNumbers (int * iNumbers, int iTotalNumbers)
{
/* this function shows the values addresses by the iNumbers
pointer, so that the user can know between which numbers the GCD
operation is being performed */