You are viewing a single comment's thread. Return to all comments →
My code is not passing 2nd test case despite showing the right output! any help will be appreciated
import static java.lang.System.in; class Prime{ void checkPrime(int ...input){ int flag=0; for (int num : input){ if(isPrime(num)) System.out.print(num+" "); flag++; } if(flag<4) System.out.println(); } private boolean isPrime(int num){ BigInteger bi; bi = BigInteger.valueOf(num); return bi.isProbablePrime(1); } }
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 →
My code is not passing 2nd test case despite showing the right output! any help will be appreciated