この方が簡潔か。

int gcm(int *in, int num){
  if (num == 1) return *in;
  else return gcm_(*in, gcm(in + 1, num - 1));
}