title: Is this recursive GCD function correct?
body: <p>Everything compiles and runs perfectly for my program. I had to write a recursive GCD function. I used two functions however, gcdRecursive and gcd. Can I condense this code into a single function so I do not need the gcd function within my code below? Or is my code correct as it is and the two functions are both needed.</p>
  
  <pre><code>void gcdRecursive(int *x, int *y, int i){
    if (i &gt;= 1) {
      if (*x % i == 0 &amp;&amp; *y % i == 0) {
          printf("The GCD of %d and %d is %d", *x, *y, i); 
      } 
      else {
          gcdRecursive(x, y, i - 1);
      }
    }
  }
  void gcd(int *x, int *y){
    getValuesForGCD(x, y);
    gcdRecursive(x, y, *x);
  } 
  </code></pre>