//Program to calculate the GCD of 2 numbers
//By www.neiljohan.com

public class GCDClass
{

	/** @param N1 & N2 the values for working out the GCD
	 *  precondition tK & tN >= 1
	 *  @return GCD so that GCD<=0 */

    public static int GCD(int N1, int N2)
        {
		if(N2 == 0){
			return N1;
		}else{
			return GCD(N2, N1%N2);
		}

        }
}
