You are viewing a single comment's thread. Return to all comments →
Just use Java's BigInteger class:
import static java.lang.System.in; class Prime { public void checkPrime(int...nums){ for(int i = 0; i < nums.length; i++){ if(new BigInteger(nums[i] +"").isProbablePrime(1)){ System.out.print(nums[i]); if(i < nums.length - 1) System.out.print(" "); } } System.out.println(); } }
Seems like cookies are disabled on this browser, please enable them to open this website
Prime Checker
You are viewing a single comment's thread. Return to all comments →
Just use Java's BigInteger class: