long int personalRobotics::gcd(long int aIn, long int bIn) { long int a, b; a = aIn>bIn ? aIn : bIn; b = aIn<bIn ? aIn : bIn; return gcdr(a, b); }
long int personalRobotics::gcdr(long int a, long int b) { //a is always greater than b if (b == 0) return a; return gcdr(b, a%b); }
int gcdr ( int a, int b ) { if ( a==0 ) return b; return gcdr ( b%a, a ); }
int main(){ return gcdr(4,6); }
/* Recursive Standard C Function: Greatest Common Divisor */ long long IamLupo::Math::gcdr(long long a, long long b) { if (a == 0) return b; return gcdr(b % a, a); }