Domanda


How do I find the nearest prime number greater than the input? This is what I've managed to do so far...
function out = next_prime(X) out = 0; n = 0; while out == isprime(X) n = n + 1; out = out + n + X; ...

oltre 3 anni fa | 1 risposta | 0

1

risposta