Fast Enterprises Interview Question

Write an algorithm that checks if a number is prime?