Search across blog, articles, projects, courses, and community posts
A prime is a number greater than 1 with no divisors other than 1 and itself. Read n and print prime if it is prime, otherwise not prime.
Input: one integer n.
Output: prime or not prime.
1 <= n <= 10^6. Note that 1 is not prime.
7
prime
10
not prime