Pergunta de entrevista da empresa Gridlogics

Print prime numbers from 1 to n?