295 B
295 B
Next Prime
Given an integer, create a function that returns the next prime. If the number is prime, return the number itself.
Examples
NextPrime(12) ➞ 13
NextPrime(24) ➞ 29
NextPrime(11) ➞ 11
// 11 is a prime, so we return the number itself.
Notes
- N/A