提问


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; ...

4 years 前 | 1 个回答 | 0

1

个回答