1
Can anyone help me with this recursive function? It’s for her to calculate the maximum common divisor between two numbers but I don’t know what’s wrong with my function.
int mdc(int m, int n){
int aux;
if(n>m || n<0){
return 0;
}
else{
aux=mdc(n, m % n);
return aux;
}
}
It worked!!! Thank you very much.
– L. Linhares