Pregunta de entrevista de Ladders

Write a function that, given a number n, prints all primes <= n.