A program to check whether a number is a prime