Pregunta de entrevista de Applied Materials

Output all prime numbers up until input n