You are viewing a single comment's thread. Return to all comments →
String n = bufferedReader.readLine(); BigInteger A = new BigInteger(n); if (A.isProbablePrime(1)){ System.out.println("prime"); } else{ System.out.println("not prime"); } bufferedReader.close(); }
Seems like cookies are disabled on this browser, please enable them to open this website
Java Primality Test
You are viewing a single comment's thread. Return to all comments →