Question d’entretien chez AMD

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