Question d’entretien chez Chartboost

Write a function to detect whether a number is prime.