Search:

Type: Posts; User: helloworld922

Search: Search took 0.07 seconds.

  1. Re: Euclid Calculator GCD and LCM using BigInteger

    The Euclidean GCD algorithm I use doesn't have modulos in it, it uses subtraction.

    Wikipedia: Euclidean Algorithm Implementations
  2. Re: Euclid Calculator GCD and LCM using BigInteger

    while(a.compareTo(b) > 0){
    if (a.compareTo(b) > b.intValue())

    You're using the compareTo function wrong.

    Compare to will return a result less than 0, 0, or greater than 0 depending on what...
Results 1 to 2 of 2