C Program to Check Whether a Number Is Prime [Easy Methods]A prime number has only two factors: 1 and itself. Primes can be written as a product of two numbers in one way.