We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
class Prime{
public void checkPrime(int... intArgs){
int count=0;
for(int i : intArgs){
if(i!=1){
count=0;
for(int j=2;j<=i/2;j++){
if(i%j==0){
count++;
}
Prime Checker
You are viewing a single comment's thread. Return to all comments →
class Prime{ public void checkPrime(int... intArgs){ int count=0; for(int i : intArgs){ if(i!=1){ count=0; for(int j=2;j<=i/2;j++){ if(i%j==0){ count++; }
}