Find the Next Prime Number

The following program will find the next prime after the value keyed in. Note any calculation that takes more than 30 seconds will fail.

Enter a number:

Next prime number is: