Fast Enterprises interview question

Write code that checks if a number is prime.