Problem Statement
Write a C program that reads a positive integer from the user and determines whether it is a prime number.
A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.
Your program must use a loop to check for divisibility. Output one of the following messages based on the result:
PRIMEif the number is prime.NOT PRIMEif the number is not prime.INVALID INPUTif the number is less than or equal to 1.
Examples:
- 2 is prime.
- 4 is not prime (divisible by 2).
- 1 is not prime (not greater than 1).