Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 24, 2020 01:23
Show Gist options
  • Select an option

  • Save parzibyte/b6f8723c6a1a2008e2937198b2eb3b54 to your computer and use it in GitHub Desktop.

Select an option

Save parzibyte/b6f8723c6a1a2008e2937198b2eb3b54 to your computer and use it in GitHub Desktop.

Revisions

  1. parzibyte created this gist Aug 24, 2020.
    9 changes: 9 additions & 0 deletions mcd.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    public static int maximoComunDivisor(int a, int b) {
    int temporal;//Para no perder b
    while (b != 0) {
    temporal = b;
    b = a % b;
    a = temporal;
    }
    return a;
    }