TUTTO è forza bruta xD
A quale parte ti riferivi?
Questa?
O questa?codice:bool IsPrime(long n) { //Sets the maximum factor to be tested //as the square root of the number long limit = (long)(sqrt(n) + 1); for (int i = 2; i < limit; i++) if ((n % i) == 0) return false; return true; }
codice://Finds next prime factor do { factor++; } while (!IsPrime(factor));