A prime number is an integer greater than 1 and divisible by only itself and 1. The first seven prime numbers are 2, 3, 5, 7, 11, 13, and 17. Write a method that returns true if its parameter is a prime number. Using this method, write a program that repeatedly asks the user for input and displays Prime if the input is a prime number and Not Prime, otherwise. Stop the repetition when the input is a negative number.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here