Skip to content

Instantly share code, notes, and snippets.

@gmfc
Created May 20, 2013 12:50
Show Gist options
  • Select an option

  • Save gmfc/5612021 to your computer and use it in GitHub Desktop.

Select an option

Save gmfc/5612021 to your computer and use it in GitHub Desktop.
public int mdc( int x, int y ){
if(x == y){
return x;
}
else if( y > x ){
return mdc( x, y-x );
}
else if( x > y ){
return mdc( x - y, y );
}
return 0;
}
@gmfc
Copy link
Copy Markdown
Author

gmfc commented May 20, 2013

//pode dar StackOverflow devido a repercusividade!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment