maximo comun divisor

C
// calcula el maximo comun divisor
	int mcd(int a, int b){
    int max;

    if(b == 0){
      max = a;
    }else{
      max = mcd(b, a % b);
    }

    return max;
	}
Source

Also in C: