2006 Challenge Problem #1   (Prime Time)


Create a class called PrimeTime with a main method. Inside the main method, prompt the user
for an integer n. If n is greater than or equal to 2, print out all the prime numbers between 2 and
n inclusive (one number per line). Recall that a prime number is a positive integer (2 or larger)
that is only divisible by 1 and itself. For example, 13 is prime, but 15 is not. If n is less than 2,
print out "Number entered is too small" and terminate.

Additional challenge: Once the program above is working correctly, modify it so that if the user
enters a value of n that is less than 2, then the user will be repeatedly prompted for a new value until
an integer greater than or equal to 2 is entered.