import java.math.BigInteger;
public class GCD {
public static void main(String[] args) {
GCD testGCD = new GCD();
BigInteger n = BigInteger.valueOf(9384041234832094823094898230);//<---this is giving me a problem
//BigInteger second = BigInteger.valueOf(3033092482498243802498); //<---and this
testGCD.gcdTest(5,6);
}
public static long gcdTest (int n, int m)
{
if (m==0)
{
System.out.println("n: "+n);
System.out.println("m: "+m);
return (n);
}
else
System.out.println("n: "+n);
System.out.println("m: "+m);
return gcdTest(m,n%m);
}
}


Sign In
Create Account



Back to top









