Pergunta de entrevista da empresa Tripadvisor

Implement a method that prints prime number from 1 to the passed number.