@@ -0,0 +1,1008 @@
+//Basic method for finding GCD (greatest common divisor) using Euclidean algorithm%0Apublic class Euclid_GCD %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        int a = 107002;%0A        int b = 462;%0A        System.out.println(euclidBase(a, b));%0A    %7D%0A%0A    public static int euclidBase(int a, int b) %7B%0A        int cycles = 0;%0A        if (a == 0) %7B%0A            return b;%0A        %7D else if (b == 0) %7B%0A            return a;%0A        %7D%0A        if (a == b) %7B%0A            return a;%0A        %7D%0A        int swap_a;%0A        int swap_b;%0A        int div;%0A        int rem;%0A        if (a %3E b) %7B%0A            swap_a = a;%0A            swap_b = b;%0A        %7D else %7B%0A            swap_a = b;%0A            swap_b = a;%0A        %7D%0A        while (true) %7B%0A            cycles++;%0A            div = swap_a / swap_b;%0A            rem = swap_a %25 swap_b;%0A            if (rem == 0) %7B%0A                break;%0A            %7D else %7B%0A                swap_a = swap_b;%0A                swap_b = rem;%0A            %7D%0A        %7D%0A        return swap_b;%0A    %7D%0A%7D%0A

Create Euclid_GCD.java