Implemented gcd in c++ as test