Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

maximo comun divisor

// 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;
	}
 
PREVIOUS NEXT
Tagged: #maximo #comun #divisor
ADD COMMENT
Topic
Name
5+6 =