Fast Enterprises Interview Question

Write a method to find whether a number is prime or not.