Source of Exercise24.cpp


  1: //  Created by Frank M. Carrano and Timothy M. Henry.
  2: //  Copyright (c) 2017 Pearson Education, Hoboken, New Jersey.

  4: int gcd(int a, int b)
  5: {
  6:    if (a % b == 0) // Base case
  7:       return b;
  8:    else
  9:       return gcd(b, a % b);
 10: }  // end gcd