Write a program to check number is prime or not
-A number that only divisible by the 1 or by itself is known as prime number.
Not prime numbers:
-Here we try to check the given number that it is prime or not.
#include < stdio.h>
printf("It is not Prime");
printf("It is a Prime Number");
It is not Prime
It is a Prime Number
-In this program, we take an input of the integer number and try to check for prime number.
-We run the loop from i=2 to i=n-1, and divide n by every possible value of i
-If n was divisible by any of these value then it is not prime number otherwise it is prime number.
Read More →