i forgot what prime numbers are, lol.
how
so basically odd numbers?
what the f
OT: I don't know.
okay seriously how did they not teach you this stuff in third grade
OT: i did this for my IT class not too long ago, something like this:
static boolean isPrime(int num) {
for (int n2 = 2; n2 < num - 1; n2++) {
if (n1%n2 == 0){
return false;
}
}
return true;
}
it checks every number except 1 and the number given and sees if the remainder of the division of the two numbers is 0. if it finds any number that is evenly divisible without a remainder, it returns false, otherwise returns true.
this might not work though, i'd need to open the project up in eclipse or something to be sure of its functionality.