// GCD Greatest common divisor calculator
// By Ben 24/10/2018

#include <iostream>
#include <algorithm>
using namespace std;

using std::cout;
using std::endl;

int gcd(int a, int b){
	if (!b){
		return a;
	}
	return gcd(b, a % b);
}

int main()
{
	std::cout << "Greatest common divisor of 8 and 12 is : " << gcd(8, 12) << endl;
	
	system("pause");
	return 0;
}
