Fast Enterprises interview question

Write an algorithm that checks if a number is prime?