Pergunta de entrevista da empresa AMD

Write a code for: Given an integer, print all prime numbers up to that integer.