Untitled
public java v1 · immutablepublic class checkPrimality { public static boolean isPrime(int x) { for(int i = 2; i < x; i++) { //loop while x is less than i, which always raises. if((x % i) == 0) { //X is the number to check if prime, modulo gives remainder. return false; } } return true; }}