Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEATricky! Added cases for if the number entered was prime, the prime numbers are equidistant, or the number entered was 1.
I had a bit of a "why do it the easy way when you can make the challenge harder by adding more features?" moment. Mine will tell you if the number itself is prime, what the next prime down is, and what the next prime up is. I realized that they asked us just to do the next prime up since if it's the next prime down, you need extra handling for 2 and less, because there aren't primes below them.
Input range is 1-10,000