You are viewing a single comment's thread. Return to all comments →
import static java.lang.System.in; class Prime{ boolean p(int x){ if(x<=1) return false; for(int i=2;i<x;i++){ if(x%i==0) return false; } return true; } void checkPrime(int... a){ for(int x :a){ if(p(x)) System.out.print(x+" "); } 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 →