Java Primality Test

  • + 0 comments

    /* *@Author : Rehan */ BigInteger a = new BigInteger(n); if(a.isProbablePrime(100)){ System.out.println("prime"); }else{ System.out.println("not prime"); }