Write a function to check whether a number is prime or not

Code: